Merged
Conversation
Allow Home Assistant to inject a managed httpx client for the SPAN v2 bootstrap path and distinguish probe failures from real v1 panels so config flows can report connectivity errors correctly.
Advance the package version to 2.4.0 so the Home Assistant dependency can point at the HTTP injection and probe-failure handling changes on this branch.
Parse proximityProven from the v2 status endpoint response. The field is optional (added in firmware 202609); defaults to None on older panels so callers can distinguish "not proven" from "unknown."
…emaTypes alias Move temp CA cert file write into the executor alongside TLS+connect so no synchronous file I/O runs on the event loop. Move cert cleanup in disconnect to executor via run_in_executor. Remove verify=False from the fallback httpx client — all bootstrap URLs are plain HTTP so SSL verification is irrelevant, and the flag looks like a security shortcut at first glance. Narrow the CA cert download except clause from bare Exception to specific transport and API errors. Add HomieSchemaTypes type alias for the heterogeneous Homie schema dict, replacing raw dict[str, dict[str, object]] throughout.
Cover new/removed node types, new/removed properties, changed attributes, no-drift case, and non-dict property skipping. Raises field_metadata.py coverage from 58% to 98%.
Strip tests that exercise Python mechanics (dataclass construction, equality, frozen, slots, IntFlag, auto), tautological input==output assertions, fragile source-code string inspection via inspect.getsource, redundant hasattr/export checks, duplicate tests across files, and one zero-assertion diagnostic print function.
Document proximity_proven, injected HTTP client, executor file I/O, HomieSchemaTypes alias, narrowed exception handling, verify=False removal, and test cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optional http injection from HA
Test maintenance
TLS defaults