From bed616343e465e21a04f1583c83cbbdac7382f0d Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Sat, 29 Jul 2023 17:26:40 -0700 Subject: [PATCH] simplify --- custom_components/adaptive_lighting/switch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 50c69d71..09e497e4 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -2077,10 +2077,10 @@ class AdaptiveLightingManager: ) if skipped: + if not has_intercepted: + return # The call will be intercepted with the original data # Modify the service data inplace modify_service_data(data, skipped) - if not has_intercepted: - return # The call will be intercepted with the modified data # Call light turn_on service for skipped entities await self.hass.services.async_call( LIGHT_DOMAIN,