mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-14 15:54:04 +02:00
fix bug when resetting switch and it's off
This commit is contained in:
parent
008c5e444d
commit
1ec6866189
1 changed files with 7 additions and 6 deletions
|
|
@ -241,12 +241,13 @@ async def handle_set_manual_control(switch: AdaptiveSwitch, service_call: Servic
|
|||
else:
|
||||
switch.turn_on_off_listener.reset(*all_lights)
|
||||
# pylint: disable=protected-access
|
||||
await switch._adapt_lights(
|
||||
all_lights,
|
||||
transition=switch._initial_transition,
|
||||
force=True,
|
||||
context=switch.create_context("service"),
|
||||
)
|
||||
if switch.is_on:
|
||||
await switch._update_attrs_and_maybe_adapt_lights(
|
||||
all_lights,
|
||||
transition=switch._initial_transition,
|
||||
force=True,
|
||||
context=switch.create_context("service"),
|
||||
)
|
||||
|
||||
|
||||
@callback
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue