mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-11 14:24:03 +02:00
Allow adaptive_lighting.apply to turn on lights and do not issue log message (#705)
This commit is contained in:
parent
e3a84ffd96
commit
51a18f2afb
1 changed files with 4 additions and 1 deletions
|
|
@ -2694,7 +2694,10 @@ class AdaptiveLightingManager:
|
|||
off_to_on_event: Event,
|
||||
) -> bool:
|
||||
# Adaptive Lighting should never turn on lights itself
|
||||
if is_our_context(off_to_on_event.context):
|
||||
if is_our_context(off_to_on_event.context) and not is_our_context(
|
||||
off_to_on_event.context,
|
||||
"service", # adaptive_lighting.apply is allowed to turn on lights
|
||||
):
|
||||
_LOGGER.warning(
|
||||
"Detected an 'off' → 'on' event for '%s' with context.id='%s' and"
|
||||
" event='%s', triggered by the adaptive_lighting integration itself,"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue