Repository navigation
fix: address review findings on the 2.1.3b2 changes - #322
Merged
Merged
Conversation
- Threshold services resolve an entity against the monitor's stored overrides as well as the live circuits, so the override of a circuit that has left the panel can still be cleared through its orphaned entity. Only this integration's entities are matched. - A hardware status that cannot be read proceeds without clearing a standing unvalidated-hardware Repair; httpx.InvalidURL is caught too. - The hardware verdict ignores surrounding whitespace and the case of UNKNOWN, so a spelling alone cannot make the terminal refusal. - A threshold call whose entity's own panel is not loaded says so instead of reporting monitoring as disabled. - Correct the battery power docstring: an unpublished value now reads unknown where 2.0.8 reported 0 W. - Circuit sensor name fallbacks use construct_circuit_identifier_from_tabs.
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.
Follow-up fixes from a code review of the 2.1.3b2 changes since v2.1.2.
Fixes
resolve_entity_to_circuit_idmatched only the coordinator's live circuit ids, so clearing a threshold through an orphaned entity fell through to the entity id. That cleared nothing and left the real override stored. It now also matches against the monitor's stored override ids, the same way favorites removal uses stored favorites. Only this integration's entities are matched, so another integration's unique_id can't hit a short opaque circuit id./api/v2/statusread still proceeds (fail-open), but it no longer takes down a standing unvalidated-hardware Repair: an unread status is no evidence the hardware changed.httpx.InvalidURLis caught as well.UNKNOWN, so a spelling alone can't trigger the terminal refusal.favorite_panel_not_loadedinstead ofmonitoring_not_enabled. The key already exists in every language, so no translation changes.construct_circuit_identifier_from_tabs. The output is unchanged.Not changed
test_the_status_is_read_before_connecting_...). The REST version alone can't settle a refusal, becauseMAIN_32always proceeds, so it can't move into the config flow either.Testing
tests/test_current_monitor.py,tests/test_setup_entry.pyandtests/test_hardware_guard.py.tests/test_v2_config_flow_tls.pyalso fail on unmodifiedmainin the environment I ran them in.