From bc3356a7bfadc5b9fb43635ac3a69db89bfab904 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 31 Jul 2023 18:17:21 -0700 Subject: [PATCH] get --- custom_components/adaptive_lighting/switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index b86ccd64..11b7199f 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -2539,7 +2539,7 @@ 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] + is_toggle = off_to_on_event == self.toggle_event.get(entity_id) from_service = "light.toggle" if is_toggle else "light.turn_on" _LOGGER.debug( "just_turned_off: State change 'off' → 'on' triggered by '%s'",