Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ab36fe9
Add CLAUDE.md documentation for Claude Code integration
KJonline Apr 25, 2026
24c7356
Merge pull request #117 from Pyhass/master
KJonline Apr 25, 2026
532bff4
refactor: fix scan interval at 2 min, add forceUpdate, remove camera
KJonline Apr 25, 2026
e340180
Remove extra blank line between pytest import and apyhiveapi import i…
KJonline Apr 25, 2026
453effe
Add GitHub Actions workflows for dev->master release automation and b…
KJonline Apr 25, 2026
dbc0ce4
Merge pull request #118 from Pyhass/Refactor-to-no-longer-accept-dyan…
KJonline Apr 25, 2026
7ed337d
chore: bump version [skip ci]
github-actions[bot] Apr 25, 2026
c28ee95
Potential fix for pull request finding 'Explicit returns mixed with i…
KJonline Apr 25, 2026
8235d0b
Consolidate GitHub workflows: remove redundant jobs, add automated re…
KJonline Apr 25, 2026
4408565
Optimize CI workflow: add path filters to skip builds on non-code cha…
KJonline Apr 25, 2026
1c6c6ef
Merge pull request #120 from Pyhass/Clean-Up-workflows
KJonline Apr 25, 2026
ca87367
Remove alarm module and all associated references
KJonline Apr 25, 2026
cc1f580
Standardize token, config, and internal attribute naming to snake_case
KJonline Apr 25, 2026
77dff3c
Rename deviceList, entityCache, and cache methods to snake_case
KJonline Apr 25, 2026
93b5403
Replace eval-string PRODUCTS/DEVICES with EntityConfig and Device dat…
KJonline Apr 25, 2026
6c9f2da
Replace broad pylint skip-file with targeted per-file disable comments
KJonline Apr 25, 2026
400f3fa
Fix test_hub.py to use renamed update_lock attribute
KJonline Apr 25, 2026
84df099
Rename all action.py and API methods to snake_case
KJonline Apr 26, 2026
d4828d5
Add backwards-compatible camelCase aliases for public API methods
KJonline Apr 26, 2026
fe5c934
Refactor device data handling to use Device dataclass attributes inst…
KJonline Apr 26, 2026
4e509ff
Update addList to handle action entities without calling get_device_data
KJonline Apr 27, 2026
6ed4c63
Add graphify knowledge graph integration and refactor action.py for c…
KJonline Apr 27, 2026
2479ab3
Exclude graphify-out directory from CI pylint and pre-commit checks
KJonline Apr 29, 2026
4ffea56
Refactor session state to use dataclasses and extract retry/epoch hel…
KJonline May 1, 2026
ba063a6
chore: consolidate packaging config into pyproject.toml
KJonline May 2, 2026
b6b5e24
chore: consolidate packaging config into pyproject.toml
KJonline May 2, 2026
587dd4b
Merge branch 'tidy-up-codebase-v2' of https://github.com/Pyhass/Pyhiv…
KJonline May 2, 2026
37fcd81
chore: trim setup.py to unasync cmdclass only
KJonline May 2, 2026
d9d569b
chore: remove setup.cfg and requirements files (consolidated into pyp…
KJonline May 2, 2026
cc35975
chore: remove requirements file references from MANIFEST.in
KJonline May 2, 2026
2bfd36a
chore: replace flake8/isort/black with ruff in pre-commit
KJonline May 2, 2026
f0517f4
ci: update cache keys and install command, replace black/flake8/isort…
KJonline May 2, 2026
7a63bf5
ci: update version bump to target pyproject.toml
KJonline May 2, 2026
9bc8ee0
ci: update version read to target pyproject.toml
KJonline May 2, 2026
1e6f5ac
chore: fix gitignore, add pytest/coverage config, fill out CONTRIBUTING
KJonline May 2, 2026
cc5dd73
chore: replace husky/secretlint with detect-secrets pre-commit hook
KJonline May 2, 2026
9f0954a
chore: enable additional ruff rules (UP, B, PL) and apply auto-fixes
KJonline May 2, 2026
5bdc540
chore: explicitly list packages in setuptools config instead of using…
KJonline May 2, 2026
a10df63
docs: rewrite README with comprehensive usage guide and examples
KJonline May 2, 2026
88754e5
chore: add pyhive_integration package alongside apyhiveapi in setupto…
KJonline May 2, 2026
90f4f17
chore: replace data.json with anonymised fixture and add PII pre-comm…
KJonline May 2, 2026
a8c94e9
chore: rename pyhive_integration package to pyhive in setuptools config
KJonline May 2, 2026
c6955ba
chore: bump version to 2.0.0
KJonline May 4, 2026
6678ffd
chore: add graphify-out/.graphify_ast.json with complete AST analysis
KJonline May 4, 2026
9e0e4c6
Refactor setup
KJonline May 4, 2026
797d475
Merge pull request #121 from Pyhass/tidy-up-codebase-v2
KJonline May 4, 2026
3f892a3
ci: update ruff hook name from 'ruff' to 'ruff-check' in GitHub Actio…
KJonline May 4, 2026
34703bf
ci: remove pyupgrade job and rename lint-ruff to lint-ruff-check in G…
KJonline May 4, 2026
9511367
Merge pull request #122 from Pyhass/Fix-CI-workflow
KJonline May 4, 2026
255f9ac
"Claude PR Assistant workflow"
KJonline May 6, 2026
f2d005d
"Claude Code Review workflow"
KJonline May 6, 2026
697e104
Merge pull request #124 from Pyhass/add-claude-github-actions-1778107…
KJonline May 6, 2026
2a1072f
chore: standardize formatting and Python interpreter in config files
KJonline May 6, 2026
f3a2547
Merge pull request #125 from Pyhass/Fix-linter
KJonline May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 43 additions & 160 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,31 @@ on:
push:
branches:
- master
- dev
pull_request: ~
paths:
- 'src/**'
- 'tests/**'
- 'setup.py'
- 'pyproject.toml'
- 'MANIFEST.in'
- '.pre-commit-config.yaml'
- '.pylintrc'
- '.yamllint'
- '.secretlintrc.json'
- '.github/workflows/ci.yml'
- '.github/workflows/matchers/**'
pull_request:
paths:
- 'src/**'
- 'tests/**'
- 'setup.py'
- 'pyproject.toml'
- 'MANIFEST.in'
- '.pre-commit-config.yaml'
- '.pylintrc'
- '.yamllint'
- '.secretlintrc.json'
- '.github/workflows/ci.yml'
- '.github/workflows/matchers/**'

env:
CACHE_VERSION: 1
Expand Down Expand Up @@ -35,20 +58,17 @@ jobs:
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
hashFiles('pyproject.toml') }}
restore-keys: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements_test.txt') }}-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y libxml2-dev libxslt1-dev python3-dev build-essential
python -m venv venv
. venv/bin/activate
pip install -U "pip<20.3" setuptools
pip install -r requirements.txt -r requirements_test.txt
pip install -U pip setuptools
pip install -e ".[dev]"
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v4
Expand Down Expand Up @@ -84,8 +104,7 @@ jobs:
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
hashFiles('pyproject.toml') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
Expand All @@ -108,50 +127,6 @@ jobs:
. venv/bin/activate
pre-commit run --hook-stage manual bandit --all-files --show-diff-on-failure

lint-black:
name: Check black
runs-on: ubuntu-latest
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v5
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v5
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v4
with:
path: venv
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Fail job if cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Run black
run: |
. venv/bin/activate
pre-commit run --hook-stage manual black --all-files --show-diff-on-failure

lint-codespell:
name: Check codespell
runs-on: ubuntu-latest
Expand All @@ -172,8 +147,7 @@ jobs:
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
hashFiles('pyproject.toml') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -219,8 +193,7 @@ jobs:
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
hashFiles('pyproject.toml') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
Expand All @@ -246,97 +219,6 @@ jobs:
. venv/bin/activate
pre-commit run --hook-stage manual check-executables-have-shebangs --all-files

lint-flake8:
name: Check flake8
runs-on: ubuntu-latest
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v5
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v5
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v4
with:
path: venv
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Fail job if cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Register flake8 problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/flake8.json"
- name: Run flake8
run: |
. venv/bin/activate
pre-commit run --hook-stage manual flake8 --all-files

lint-isort:
name: Check isort
runs-on: ubuntu-latest
needs: prepare-base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v5
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v5
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v4
with:
path: venv
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v4
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Fail job if cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Run isort
run: |
. venv/bin/activate
pre-commit run --hook-stage manual isort --all-files --show-diff-on-failure

lint-json:
name: Check JSON
runs-on: ubuntu-latest
Expand All @@ -357,8 +239,7 @@ jobs:
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
hashFiles('pyproject.toml') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
Expand All @@ -384,8 +265,8 @@ jobs:
. venv/bin/activate
pre-commit run --hook-stage manual check-json --all-files

lint-pyupgrade:
name: Check pyupgrade
lint-ruff-check:
name: Check ruff
runs-on: ubuntu-latest
needs: prepare-base
steps:
Expand All @@ -404,8 +285,7 @@ jobs:
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
hashFiles('pyproject.toml') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
Expand All @@ -423,10 +303,14 @@ jobs:
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Run pyupgrade
- name: Run ruff-check
run: |
. venv/bin/activate
pre-commit run ruff-check --all-files --show-diff-on-failure
- name: Run ruff-format
run: |
. venv/bin/activate
pre-commit run --hook-stage manual pyupgrade --all-files --show-diff-on-failure
pre-commit run ruff-format --all-files --show-diff-on-failure

lint-yaml:
name: Check YAML
Expand All @@ -448,8 +332,7 @@ jobs:
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements.txt') }}-${{
hashFiles('requirements_test.txt') }}
hashFiles('pyproject.toml') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -489,4 +372,4 @@ jobs:
pip install pylint
- name: Analysing the code with pylint
run: |
python -m pylint --fail-under=10 `find -regextype egrep -regex '(.*.py)$'`
python -m pylint --fail-under=10 `find -regextype egrep -regex '(.*.py)$' -not -path './graphify-out/*'`
44 changes: 44 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options

50 changes: 50 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read

# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'

# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr *)'

Loading
Loading