Skip to content

Keep on-only, paused and overridden appliances on when the master switch is disabled - #72

Open
MonsterD1 wants to merge 1 commit into
InventoCasa:mainfrom
MonsterD1:fix/71-master-switch-keeps-on-only
Open

MonsterD1 wants to merge 1 commit into
InventoCasa:mainfrom
MonsterD1:fix/71-master-switch-keeps-on-only

Conversation

@MonsterD1

@MonsterD1 MonsterD1 commented Oct 30, 2026 •

Copy link
Copy Markdown

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 logs Master switch disabled: left <name> (<entity>) on (<reason>).
  • All other appliances are still turned off, and the battery discharge limit is still reset, as before.

Not changed

Testing

  • New TestMasterDisableTurnOff in tests/test_init.py: regular appliance turned off; on-only, paused and overridden appliances left on. Three of the four tests fail without the fix.
  • Full suite on the HA 2025.8 / Python 3.13 stack (requirements-ci/ha-minimum.txt): 1293 passed.
  • scripts/check_public_tree.py: 0 findings.
  • Not yet run in a live installation.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Always on device turned off when Master Control is disabled

1 participant