Repository navigation
Conversation
…tch is disabled Disabling the master switch turned off every managed appliance that was on, including on-only appliances the integration never switches off and appliances under manual control (Pause or Override). A running dryer or laptop was cut off. _turn_off_all_managed() now skips on-only, paused and overridden appliances and logs that they were left on. Other appliances are still turned off as before. Fixes InventoCasa#71 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Keep on-only, paused and overridden appliances on when the master switch is disabled
Fixes #71.
Problem
On the transition enabled → disabled of the master switch,
_turn_off_all_managed()turned off every managed appliance that was on. This included:Change
_turn_off_all_managed()skips appliances that are on-only, paused or overridden, and logsMaster switch disabled: left <name> (<entity>) on (<reason>).Not changed
Testing
TestMasterDisableTurnOffintests/test_init.py: regular appliance turned off; on-only, paused and overridden appliances left on. Three of the four tests fail without the fix.requirements-ci/ha-minimum.txt): 1293 passed.scripts/check_public_tree.py: 0 findings.