basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.81k stars 134 forks source link

Detected an 'off' → 'on' logging triggered by adaptive_lighting.apply #701

Closed mindtripper closed 1 year ago

mindtripper commented 1 year ago

AL 1.18.3 using the adaptive_lighting.apply service triggers logging of Detected an 'off' → 'on' event for... Only noticeable impact is the logs filling up.

Steps to reproduce:

service: adaptive_lighting.apply
data:
  entity_id: switch.adaptive_lighting_bedrooms
  lights:
    - light.name
    - light.name_wall_flower
    - light.name_color
    - light.name_window
  turn_on_lights: true

Output logged:

2023-08-05 04:02:05.861 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name' with context.id='01H71PWC3J:al:IJSW:srvc:0D' and event='<Event state_changed[L]: entity_id=light.name, old_state=<state light.name=off; supported_color_modes=[<ColorMode.HS: 'hs'>], friendly_name=name, supported_features=32 @ 2023-08-05T04:02:02.020011+02:00>, new_state=<state light.name=on; supported_color_modes=[<ColorMode.HS: 'hs'>], color_mode=hs, brightness=3, hs_color=(29.713, 82.353), rgb_color=(255, 148, 45), xy_color=(0.574, 0.388), friendly_name=name, supported_features=32 @ 2023-08-05T04:02:05.858309+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
2023-08-05 04:02:05.863 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name' with context.id='01H71PWC3J:al:IJSW:srvc:0D' and event='<Event state_changed[L]: entity_id=light.name, old_state=<state light.name=off; supported_color_modes=[<ColorMode.HS: 'hs'>], friendly_name=name, supported_features=32 @ 2023-08-05T04:02:02.020011+02:00>, new_state=<state light.name=on; supported_color_modes=[<ColorMode.HS: 'hs'>], color_mode=hs, brightness=3, hs_color=(29.713, 82.353), rgb_color=(255, 148, 45), xy_color=(0.574, 0.388), friendly_name=name, supported_features=32 @ 2023-08-05T04:02:05.858309+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
2023-08-05 04:02:05.928 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name_color' with context.id='01H71PWC5Y:al:IJSW:srvc:0F' and event='<Event state_changed[L]: entity_id=light.name_color, old_state=<state light.name_color=off; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>], friendly_name=name Color, supported_features=32 @ 2023-08-05T04:02:02.017074+02:00>, new_state=<state light.name_color=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>], color_mode=hs, brightness=3, hs_color=(29.713, 82.353), rgb_color=(255, 148, 45), xy_color=(0.574, 0.388), friendly_name=name Color, supported_features=32 @ 2023-08-05T04:02:05.927610+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
2023-08-05 04:02:05.929 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name_color' with context.id='01H71PWC5Y:al:IJSW:srvc:0F' and event='<Event state_changed[L]: entity_id=light.name_color, old_state=<state light.name_color=off; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>], friendly_name=name Color, supported_features=32 @ 2023-08-05T04:02:02.017074+02:00>, new_state=<state light.name_color=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>], color_mode=hs, brightness=3, hs_color=(29.713, 82.353), rgb_color=(255, 148, 45), xy_color=(0.574, 0.388), friendly_name=name Color, supported_features=32 @ 2023-08-05T04:02:05.927610+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
2023-08-05 04:02:05.991 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name_window' with context.id='01H71PWC7Q:al:IJSW:srvc:0I' and event='<Event state_changed[L]: entity_id=light.name_window, old_state=<state light.name_window=off; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], friendly_name=name Window, supported_features=32 @ 2023-08-05T04:02:01.996814+02:00>, new_state=<state light.name_window=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=3, color_temp_kelvin=2202, color_temp=454, hs_color=(29.79, 84.553), rgb_color=(255, 146, 39), xy_color=(0.579, 0.388), friendly_name=name Window, supported_features=32 @ 2023-08-05T04:02:05.988589+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
2023-08-05 04:02:05.993 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name_window' with context.id='01H71PWC7Q:al:IJSW:srvc:0I' and event='<Event state_changed[L]: entity_id=light.name_window, old_state=<state light.name_window=off; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], friendly_name=name Window, supported_features=32 @ 2023-08-05T04:02:01.996814+02:00>, new_state=<state light.name_window=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=3, color_temp_kelvin=2202, color_temp=454, hs_color=(29.79, 84.553), rgb_color=(255, 146, 39), xy_color=(0.579, 0.388), friendly_name=name Window, supported_features=32 @ 2023-08-05T04:02:05.988589+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
2023-08-05 04:02:06.022 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name_wall_flower' with context.id='01H71PWC7G:al:IJSW:srvc:0H' and event='<Event state_changed[L]: entity_id=light.name_wall_flower, old_state=<state light.name_wall_flower=off; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], friendly_name=name Wall Flower, supported_features=32 @ 2023-08-05T04:02:02.027680+02:00>, new_state=<state light.name_wall_flower=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=3, friendly_name=name Wall Flower, supported_features=32 @ 2023-08-05T04:02:06.012130+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
2023-08-05 04:02:06.024 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.name_wall_flower' with context.id='01H71PWC7G:al:IJSW:srvc:0H' and event='<Event state_changed[L]: entity_id=light.name_wall_flower, old_state=<state light.name_wall_flower=off; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], friendly_name=name Wall Flower, supported_features=32 @ 2023-08-05T04:02:02.027680+02:00>, new_state=<state light.name_wall_flower=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=3, friendly_name=name Wall Flower, supported_features=32 @ 2023-08-05T04:02:06.012130+02:00>>', triggered by the adaptive_lighting integration itself, which *should* not happen. If you see this please submit an issue with your full logs at https://github.com/basnijholt/adaptive-lighting
basnijholt commented 1 year ago

Thanks a lot for reporting. This is actually expected here and I shouldn’t print a log message for the apply service. Will fix this ASAP.

mindtripper commented 1 year ago

You are very welcome. Been an avid and happy user of this component for a long time. Glad I can contribute.

No need to stress this minor issue. I'm filtering out the logs for now :)