diff --git a/custom_components/adaptive_lighting/hass_utils.py b/custom_components/adaptive_lighting/hass_utils.py index ba5bb8b0..cafd9cdf 100644 --- a/custom_components/adaptive_lighting/hass_utils.py +++ b/custom_components/adaptive_lighting/hass_utils.py @@ -8,6 +8,7 @@ from homeassistant.util.read_only_dict import ReadOnlyDict from .adaptation_utils import ServiceData _LOGGER = logging.getLogger(__name__) +_DEBUG_MODE = True def setup_service_call_interceptor( @@ -58,6 +59,8 @@ def setup_service_call_interceptor( call.data, e, ) + if _DEBUG_MODE: + raise # Call original service handler with processed data await existing_service.job.target(call) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 09e497e4..0f1d87a1 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -2082,6 +2082,11 @@ class AdaptiveLightingManager: # Modify the service data inplace modify_service_data(data, skipped) # Call light turn_on service for skipped entities + _LOGGER.debug( + "_service_interceptor_turn_on_handler: calling `light.turn_on` with skipped='%s', data: ", + skipped, + data, + ) await self.hass.services.async_call( LIGHT_DOMAIN, SERVICE_TURN_ON,