mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-14 07:44:04 +02:00
Test that switch is on before updating time listeners (#936)
Co-authored-by: Michael Carroll <mjoecarroll@gmail.com>
This commit is contained in:
parent
bc8c94081a
commit
92aa50411a
1 changed files with 2 additions and 1 deletions
|
|
@ -359,7 +359,8 @@ async def handle_change_switch_settings(
|
|||
|
||||
# deep copy the defaults so we don't modify the original dicts
|
||||
switch._set_changeable_settings(data=data, defaults=deepcopy(defaults))
|
||||
switch._update_time_interval_listener()
|
||||
if switch.is_on:
|
||||
switch._update_time_interval_listener()
|
||||
|
||||
_LOGGER.debug(
|
||||
"Called 'adaptive_lighting.change_switch_settings' service with '%s'",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue