From 29e0852d88a268fdfbbabb3e4a9787444a8d95ff Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 31 Jul 2023 16:14:12 -0700 Subject: [PATCH] test --- custom_components/adaptive_lighting/switch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index e129f6d3..20c2872b 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -2002,7 +2002,12 @@ class AdaptiveLightingManager: call.context.id, ) + # Reset because turning on the light, this also happens in + # `turn_on_off_event_listener`, however, this function is called + # before that one. + _LOGGER.debug("first") self.reset(entity_id, reset_manual_control=False) + self.clear_proactively_adapting(entity_id) transition = data[CONF_PARAMS].get( @@ -2350,7 +2355,7 @@ class AdaptiveLightingManager: entity_id, event.context.id, ) - + _LOGGER.debug("second") if event.context.parent_id and not self.is_proactively_adapting( event.context.id, ):