mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
log
This commit is contained in:
parent
346b821f1e
commit
7bbf091a2a
1 changed files with 5 additions and 2 deletions
|
|
@ -1275,7 +1275,7 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity):
|
|||
if context.parent_id is not None and self.manager.is_proactively_adapting(
|
||||
context.parent_id,
|
||||
):
|
||||
# Skip if adaptation was already executed by the service call interceptor
|
||||
# Skip if adaptation was already executed by the service call interceptor.
|
||||
# The context.parent_id is the context.id of the service call that was intercepted
|
||||
# and context.id here is from the resulting "light_event" event.
|
||||
_LOGGER.debug(
|
||||
|
|
@ -2539,8 +2539,11 @@ class AdaptiveLightingManager:
|
|||
transition = None
|
||||
|
||||
if self._off_to_on_state_event_is_from_turn_on(entity_id, off_to_on_event):
|
||||
is_toggle = off_to_on_event == self.toggle_event[entity_id]
|
||||
from_service = "light.toggle" if is_toggle else "light.turn_on"
|
||||
_LOGGER.debug(
|
||||
"just_turned_off: State change 'off' → 'on' triggered by 'light.turn_on' or 'light.toggle'",
|
||||
"just_turned_off: State change 'off' → 'on' triggered by '%s'",
|
||||
from_service,
|
||||
)
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue