Skip to content

Dev to Main - #162

Merged
bvweerd merged 8 commits into
mainfrom
dev
Oct 6, 2026
Merged

bvweerd merged 8 commits into
mainfrom
dev

Conversation

@bvweerd

@bvweerd bvweerd commented Oct 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

alaraun and others added 8 commits October 5, 2026 22:42
The input listeners were plain functions, so Home Assistant ran each of
the 11 as an executor job for every state_changed event in the system,
and called hass.async_create_task from a worker thread. At shutdown the
executor is gone and every state change logs 11 "Executor shutdown has
been called" errors.

They also never matched: they compared against number.<entry_id>_<key>,
but entity_ids follow the device name, so a parameter change reached the
controller only on the next interval tick.

Use one callback listener with a callback event filter that matches the
entry's input entities by unique_id, as PIDDeviceHandle already does. An
entity being added, removed or passing through unavailable/unknown is
not treated as a change.
Home Assistant 2026.10 replaced voluptuous with probatio and now types
async_show_form's data_schema as probatio.Schema, so the lint job's mypy
step fails on dev (scheduled run of 2026-10-05) and on every pull request.
voluptuous is also no longer a Home Assistant dependency.

Import probatio as vol from 2026.10 on and voluptuous before that. The
choice goes by version, not by whether probatio imports: 2026.9 already
installs probatio but still expects voluptuous schemas.

The pre-commit mypy hook types against the latest stable release (2026.9)
and the lint job against the one pytest-homeassistant-custom-component
pins (2026.10), so the two config flow schemas are annotated Any.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012VjGcBURcFQJMzcFaFvciV
Both entities went from no state or unknown to a value, which the event
filter rejects before it looks at the unique_id. The test therefore kept
passing with the unique_id check replaced by 'return True'. Give them a
value first, so the change under test is a real one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012VjGcBURcFQJMzcFaFvciV
…ude/pr158-test-fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012VjGcBURcFQJMzcFaFvciV
fix: use probatio schemas on Home Assistant 2026.10 and later
fix: refresh on input changes without an executor job per state change (#158 + test fix)
For a pull request from a fork, the pull_request event gets a read-only
token regardless of the permissions block, so the labeler failed with
"Resource not accessible by integration" (seen on #158). Run on
pull_request_target instead, which uses the base branch's workflow and a
writable token. Neither step checks out or runs the pull request's code,
which is what keeps that safe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012VjGcBURcFQJMzcFaFvciV
ci: label pull requests from forks too
@github-actions github-actions Bot added the enhancement New feature or improvement label Oct 6, 2026
@bvweerd
bvweerd merged commit b326fcf into main Oct 6, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants