mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-15 00:04:05 +02:00
Debug mode
This commit is contained in:
parent
8e305741fb
commit
a31ffe293a
2 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue