basnijholt / adaptive-lighting

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

Scene activation doesn't lead to manually controlled lights #773

Closed JN-Jones closed 11 months ago

JN-Jones commented 12 months ago

Home Assistant Adaptive Lighting Issue Template

Bug Reports

If you need help with using or configuring Adaptive Lighting, please open a Q&A discussion thread here instead.

Before submitting a bug report, please follow these troubleshooting steps:

Please confirm that you have completed the following steps:

Required information for bug reports:

Please include the following information in your issue.

Issues missing this information may not be addressed.

  1. Debug logs captured while the issue occurred. See here for instructions on enabling debug logging:
2023-08-26 18:03:45.075 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CJS95JQT96K5D849NW4C', is_skipped_hash='False'
2023-08-26 18:03:45.075 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CJS95JQT96K5D849NW4C): entity_id=['light.bad'], params=brightness=255, color_temp=153, color_temp_kelvin=6535>', service_data='{'entity_id': ['light.bad'], 'params': {'brightness': 255, 'color_temp': 153, 'color_temp_kelvin': 6535}}'
2023-08-26 18:03:45.075 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] _mark_manual_control_if_non_bare_turn_on: entity_id='light.bad', service_data='{'brightness': 255, 'color_temp': 153, 'color_temp_kelvin': 6535}'
2023-08-26 18:03:45.075 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Marking 'light.bad' as manually controlled.
2023-08-26 18:03:45.075 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Switch is off or light is already on for entity_id='light.bad', skipped='[]' (is_on='True', is_state='False', manual_control='True', switch._intercept='True')
2023-08-26 18:03:45.075 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.bad']'
2023-08-26 18:03:45.076 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CJS95JQT96K5D849NW4C', is_skipped_hash='False'
2023-08-26 18:03:45.076 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CJS95JQT96K5D849NW4C): entity_id=['light.kuche'], params=brightness=255, xy_color=(0.6915, 0.3083)>', service_data='{'entity_id': ['light.kuche'], 'params': {'brightness': 255, 'xy_color': (0.6915, 0.3083)}}'
2023-08-26 18:03:45.077 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.kuche', skipped='['light.kuche']'
2023-08-26 18:03:45.077 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.kuche']'
2023-08-26 18:03:45.077 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CJS95JQT96K5D849NW4C', is_skipped_hash='False'
2023-08-26 18:03:45.077 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CJS95JQT96K5D849NW4C): entity_id=['light.schlafzimmer'], params=brightness=255, color_temp=235, color_temp_kelvin=4255>', service_data='{'entity_id': ['light.schlafzimmer'], 'params': {'brightness': 255, 'color_temp': 235, 'color_temp_kelvin': 4255}}'
2023-08-26 18:03:45.077 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.schlafzimmer', skipped='['light.schlafzimmer']'
2023-08-26 18:03:45.077 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.schlafzimmer']'
2023-08-26 18:03:45.078 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CJS95JQT96K5D849NW4C', is_skipped_hash='False'
2023-08-26 18:03:45.078 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CJS95JQT96K5D849NW4C): entity_id=['light.wohnzimmer'], params=brightness=255, xy_color=(0.6915, 0.3083)>', service_data='{'entity_id': ['light.wohnzimmer'], 'params': {'brightness': 255, 'xy_color': (0.6915, 0.3083)}}'
2023-08-26 18:03:45.078 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.wohnzimmer', skipped='['light.wohnzimmer']'
2023-08-26 18:03:45.078 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.wohnzimmer']'
2023-08-26 18:03:45.078 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.bad']')' event with context.id='01H8S9CJS95JQT96K5D849NW4C'
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.bad' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 6535, 'color_temp': 153, 'hs_color': (54.768, 1.6), 'rgb_color': (255, 254, 250), 'xy_color': (0.326, 0.333), 'is_hue_group': True, 'hue_scenes': {'Rasieren'}, 'hue_type': 'room', 'lights': {'Bad Rechts', 'Bad Links'}, 'dynamics': False, 'icon': 'mdi:lightbulb-group', 'friendly_name': 'Bad', 'supported_features': <LightEntityFeature.FLASH|TRANSITION: 40>}' with context.id='01H8S9CJS95JQT96K5D849NW4C'
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.bad' with context.id='01H8S9CJS95JQT96K5D849NW4C'
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CJS95JQT96K5D849NW4C'
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: No 'on' → 'off' state change has been registered before for 'light.bad'. It's possible that the light was already on when Home Assistant was turned on.
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CJS95JQT96K5D849NW4C'
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] _mark_manual_control_if_non_bare_turn_on: entity_id='light.bad', service_data='{'entity_id': 'light.bad', 'brightness': 255, 'color_temp': 153}'
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Marking 'light.bad' as manually controlled.
2023-08-26 18:03:46.553 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Skipping responding to 'off' → 'on' event for 'light.bad' with context.id='01H8S9CJS95JQT96K5D849NW4C' because we only adapt on bare `light.turn_on` events and not on service_data: '{'entity_id': 'light.bad', 'brightness': 255, 'color_temp': 153}'
2023-08-26 18:03:46.557 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_links' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 248, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Links', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7C2KCSAWNJ59PFCQAG'
2023-08-26 18:03:46.557 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.kueche_links' with context.id='01H8S9CM7C2KCSAWNJ59PFCQAG'
2023-08-26 18:03:46.557 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7C2KCSAWNJ59PFCQAG'
2023-08-26 18:03:46.557 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: No 'on' → 'off' state change has been registered before for 'light.kueche_links'. It's possible that the light was already on when Home Assistant was turned on.
2023-08-26 18:03:46.558 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7C2KCSAWNJ59PFCQAG'
2023-08-26 18:03:46.558 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: '_update_attrs_and_maybe_adapt_lights' called with context.id='01H8S9CM7Y:al:JVQW:lght:07' lights: '['light.kueche_links']', transition: '1.0', force: 'True'
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: filtered_lights: '['light.kueche_links']'
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.kueche_links' with transition 1.0 and context.id=01H8S9CM7Y:al:JVQW:lght:07
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 248, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7DEXDWGHY65HRGQYMF'
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.kueche_rechts' with context.id='01H8S9CM7DEXDWGHY65HRGQYMF'
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7DEXDWGHY65HRGQYMF'
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: No 'on' → 'off' state change has been registered before for 'light.kueche_rechts'. It's possible that the light was already on when Home Assistant was turned on.
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7DEXDWGHY65HRGQYMF'
2023-08-26 18:03:46.559 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: '_update_attrs_and_maybe_adapt_lights' called with context.id='01H8S9CM7Z:al:JVQW:lght:08' lights: '['light.kueche_rechts']', transition: '1.0', force: 'True'
2023-08-26 18:03:46.560 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: filtered_lights: '['light.kueche_rechts']'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.kueche_rechts' with transition 1.0 and context.id=01H8S9CM7Z:al:JVQW:lght:08
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_links' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Links', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7D361FR8T7CZVGVEH5'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7EYPA8H6FFK59TKM1X'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_links' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Links', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7FBB24KKY0VJR5XJDY'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7FX3HBTQWHJ00HH0N0'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.schlafzimmer_tisch' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['None', 'candle'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 248, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Schlafzimmer Tisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7G3CF7E2Q53MGYHED6'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.schlafzimmer_tisch' with context.id='01H8S9CM7G3CF7E2Q53MGYHED6'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7G3CF7E2Q53MGYHED6'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: No 'on' → 'off' state change has been registered before for 'light.schlafzimmer_tisch'. It's possible that the light was already on when Home Assistant was turned on.
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7G3CF7E2Q53MGYHED6'
2023-08-26 18:03:46.561 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: '_update_attrs_and_maybe_adapt_lights' called with context.id='01H8S9CM81:al:JVQW:lght:09' lights: '['light.schlafzimmer_tisch']', transition: '1.0', force: 'True'
2023-08-26 18:03:46.566 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: filtered_lights: '['light.schlafzimmer_tisch']'
2023-08-26 18:03:46.566 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.schlafzimmer_tisch' with transition 1.0 and context.id=01H8S9CM81:al:JVQW:lght:09
2023-08-26 18:03:46.566 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.schlafzimmer_tisch' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['None', 'candle'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Schlafzimmer Tisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7GVBZ6T35VRFC0D2KX'
2023-08-26 18:03:46.566 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.schlafzimmer_tisch' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['None', 'candle'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4255, 'color_temp': 235, 'hs_color': (26.732, 30.439), 'rgb_color': (255, 211, 177), 'xy_color': (0.407, 0.36), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Schlafzimmer Tisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7JYSX9QQEQQZCNTZWV'
2023-08-26 18:03:46.566 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.stehlampe' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 248, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Stehlampe', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7KMT6N2E60G81QQVF9'
2023-08-26 18:03:46.567 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.stehlampe' with context.id='01H8S9CM7KMT6N2E60G81QQVF9'
2023-08-26 18:03:46.567 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7KMT6N2E60G81QQVF9'
2023-08-26 18:03:46.567 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: No 'on' → 'off' state change has been registered before for 'light.stehlampe'. It's possible that the light was already on when Home Assistant was turned on.
2023-08-26 18:03:46.567 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7KMT6N2E60G81QQVF9'
2023-08-26 18:03:46.567 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: '_update_attrs_and_maybe_adapt_lights' called with context.id='01H8S9CM87:al:JVQW:lght:0A' lights: '['light.stehlampe']', transition: '1.0', force: 'True'
2023-08-26 18:03:46.568 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: filtered_lights: '['light.stehlampe']'
2023-08-26 18:03:46.568 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.stehlampe' with transition 1.0 and context.id=01H8S9CM87:al:JVQW:lght:0A
2023-08-26 18:03:46.568 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.tv' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 248, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'TV', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7MV4X3TB96EJRXSGKH'
2023-08-26 18:03:46.568 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.tv' with context.id='01H8S9CM7MV4X3TB96EJRXSGKH'
2023-08-26 18:03:46.568 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7MV4X3TB96EJRXSGKH'
2023-08-26 18:03:46.568 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: No 'on' → 'off' state change has been registered before for 'light.tv'. It's possible that the light was already on when Home Assistant was turned on.
2023-08-26 18:03:46.568 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01H8S9CM7MV4X3TB96EJRXSGKH'
2023-08-26 18:03:46.569 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: '_update_attrs_and_maybe_adapt_lights' called with context.id='01H8S9CM88:al:JVQW:lght:0B' lights: '['light.tv']', transition: '1.0', force: 'True'
2023-08-26 18:03:46.569 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: filtered_lights: '['light.tv']'
2023-08-26 18:03:46.570 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.tv' with transition 1.0 and context.id=01H8S9CM88:al:JVQW:lght:0B
2023-08-26 18:03:46.570 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.stehlampe' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Stehlampe', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7NMSW1T96XKY8HJT5A'
2023-08-26 18:03:46.570 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.tv' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4166, 'color_temp': 240, 'hs_color': (26.752, 31.945), 'rgb_color': (255, 209, 173), 'xy_color': (0.411, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'TV', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7PQP6R7MS28WNF0XEB'
2023-08-26 18:03:46.570 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.stehlampe' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Stehlampe', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7PCA20HZKZHC03WHFF'
2023-08-26 18:03:46.570 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.tv' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'TV', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7QJV5WPHVA2A3D4WSF'
2023-08-26 18:03:46.572 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Setting color_temp of light light.kueche_links
2023-08-26 18:03:46.572 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.kueche_links with service data {'entity_id': 'light.kueche_links', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025}
2023-08-26 18:03:46.572 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.kueche_links, context_id=01H8S9CM7Y:al:JVQW:lght:07, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-08-26 18:03:46.573 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Setting color_temp of light light.kueche_rechts
2023-08-26 18:03:46.573 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.kueche_rechts with service data {'entity_id': 'light.kueche_rechts', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025}
2023-08-26 18:03:46.573 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.kueche_rechts, context_id=01H8S9CM7Z:al:JVQW:lght:08, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-08-26 18:03:46.574 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Setting color_temp of light light.schlafzimmer_tisch
2023-08-26 18:03:46.574 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.schlafzimmer_tisch with service data {'entity_id': 'light.schlafzimmer_tisch', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025}
2023-08-26 18:03:46.574 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.schlafzimmer_tisch, context_id=01H8S9CM81:al:JVQW:lght:09, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-08-26 18:03:46.575 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Setting color_temp of light light.stehlampe
2023-08-26 18:03:46.575 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.stehlampe with service data {'entity_id': 'light.stehlampe', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025}
2023-08-26 18:03:46.575 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.stehlampe, context_id=01H8S9CM87:al:JVQW:lght:0A, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-08-26 18:03:46.576 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Setting color_temp of light light.tv
2023-08-26 18:03:46.578 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.tv with service data {'entity_id': 'light.tv', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025}
2023-08-26 18:03:46.578 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.tv, context_id=01H8S9CM88:al:JVQW:lght:0B, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-08-26 18:03:46.578 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.kueche_links', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025} with context.id='01H8S9CM7Y:al:JVQW:lght:07'
2023-08-26 18:03:46.579 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.kueche_rechts', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025} with context.id='01H8S9CM7Z:al:JVQW:lght:08'
2023-08-26 18:03:46.579 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.schlafzimmer_tisch', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025} with context.id='01H8S9CM81:al:JVQW:lght:09'
2023-08-26 18:03:46.579 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.stehlampe', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025} with context.id='01H8S9CM87:al:JVQW:lght:0A'
2023-08-26 18:03:46.580 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Main: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.tv', 'transition': 1.0, 'brightness': 245, 'color_temp_kelvin': 4025} with context.id='01H8S9CM88:al:JVQW:lght:0B'
2023-08-26 18:03:46.581 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.kueche_links']')' event with context.id='01H8S9CM7Y:al:JVQW:lght:07'
2023-08-26 18:03:46.581 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CM7Y:al:JVQW:lght:07', is_skipped_hash='False'
2023-08-26 18:03:46.581 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.kueche_rechts']')' event with context.id='01H8S9CM7Z:al:JVQW:lght:08'
2023-08-26 18:03:46.581 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CM7Z:al:JVQW:lght:08', is_skipped_hash='False'
2023-08-26 18:03:46.601 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.schlafzimmer_tisch']')' event with context.id='01H8S9CM81:al:JVQW:lght:09'
2023-08-26 18:03:46.601 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CM81:al:JVQW:lght:09', is_skipped_hash='False'
2023-08-26 18:03:46.602 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.stehlampe']')' event with context.id='01H8S9CM87:al:JVQW:lght:0A'
2023-08-26 18:03:46.602 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CM87:al:JVQW:lght:0A', is_skipped_hash='False'
2023-08-26 18:03:46.603 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.tv']')' event with context.id='01H8S9CM88:al:JVQW:lght:0B'
2023-08-26 18:03:46.603 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CM88:al:JVQW:lght:0B', is_skipped_hash='False'
2023-08-26 18:03:47.582 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_links' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 245, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Links', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7Y:al:JVQW:lght:07'
2023-08-26 18:03:47.582 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.kueche_links=on; min_color_temp_kelvin=2000, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=500, effect_list=['None', 'candle', 'fire', 'unknown'], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], color_mode=xy, brightness=245, hs_color=(10.118, 100.0), rgb_color=(255, 43, 0), xy_color=(0.6915, 0.3083), effect=None, mode=normal, dynamics=none, friendly_name=Küche Links, supported_features=44 @ 2023-08-26T18:03:46.540761+02:00>' found for light.kueche_links
2023-08-26 18:03:47.585 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.kueche_links
2023-08-26 18:03:47.587 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_links' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Links', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7Y:al:JVQW:lght:07'
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.kueche_links' is already in 'self.our_last_state_on_change' (01H8S9CM7Y:al:JVQW:lght:07) adding this state also
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 245, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7Z:al:JVQW:lght:08'
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.kueche_rechts=on; min_color_temp_kelvin=2000, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=500, effect_list=['None', 'candle', 'fire', 'unknown'], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], color_mode=xy, brightness=245, hs_color=(10.118, 100.0), rgb_color=(255, 43, 0), xy_color=(0.6915, 0.3083), effect=None, mode=normal, dynamics=none, friendly_name=Küche Rechts, supported_features=44 @ 2023-08-26T18:03:46.541424+02:00>' found for light.kueche_rechts
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.kueche_rechts
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7Z:al:JVQW:lght:08'
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.kueche_rechts' is already in 'self.our_last_state_on_change' (01H8S9CM7Z:al:JVQW:lght:08) adding this state also
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.schlafzimmer_tisch' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['None', 'candle'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4255, 'color_temp': 235, 'hs_color': (26.732, 30.439), 'rgb_color': (255, 211, 177), 'xy_color': (0.407, 0.36), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Schlafzimmer Tisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM81:al:JVQW:lght:09'
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.schlafzimmer_tisch=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=454, effect_list=['None', 'candle'], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=245, color_temp_kelvin=4255, color_temp=235, hs_color=(26.732, 30.439), rgb_color=(255, 211, 177), xy_color=(0.407, 0.36), effect=None, mode=normal, dynamics=none, friendly_name=Schlafzimmer Tisch, supported_features=44 @ 2023-08-26T18:03:46.544359+02:00>' found for light.schlafzimmer_tisch
2023-08-26 18:03:47.588 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.schlafzimmer_tisch
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.schlafzimmer_tisch' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['None', 'candle'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Schlafzimmer Tisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM81:al:JVQW:lght:09'
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.schlafzimmer_tisch' is already in 'self.our_last_state_on_change' (01H8S9CM81:al:JVQW:lght:09) adding this state also
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.stehlampe' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 245, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Stehlampe', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM87:al:JVQW:lght:0A'
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.stehlampe=on; min_color_temp_kelvin=2000, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=500, effect_list=['None', 'candle', 'fire', 'unknown', 'sunrise'], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], color_mode=xy, brightness=245, hs_color=(10.118, 100.0), rgb_color=(255, 43, 0), xy_color=(0.6915, 0.3083), effect=None, mode=normal, dynamics=none, friendly_name=Stehlampe, supported_features=44 @ 2023-08-26T18:03:46.547472+02:00>' found for light.stehlampe
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.stehlampe
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.stehlampe' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Stehlampe', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM87:al:JVQW:lght:0A'
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.stehlampe' is already in 'self.our_last_state_on_change' (01H8S9CM87:al:JVQW:lght:0A) adding this state also
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 252, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7Z:al:JVQW:lght:08'
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.kueche_rechts' is already in 'self.our_last_state_on_change' (01H8S9CM7Z:al:JVQW:lght:08) adding this state also
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.tv' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 245, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'TV', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM88:al:JVQW:lght:0B'
2023-08-26 18:03:47.589 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.tv=on; min_color_temp_kelvin=2000, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=500, effect_list=['None', 'candle', 'fire', 'unknown', 'sunrise'], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], color_mode=xy, brightness=245, hs_color=(10.118, 100.0), rgb_color=(255, 43, 0), xy_color=(0.6915, 0.3083), effect=None, mode=normal, dynamics=none, friendly_name=TV, supported_features=44 @ 2023-08-26T18:03:46.548602+02:00>' found for light.tv
2023-08-26 18:03:47.590 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.tv
2023-08-26 18:03:47.590 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.tv' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'TV', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM88:al:JVQW:lght:0B'
2023-08-26 18:03:47.590 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.tv' is already in 'self.our_last_state_on_change' (01H8S9CM88:al:JVQW:lght:0B) adding this state also
2023-08-26 18:03:47.590 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 252, 'color_temp_kelvin': 4115, 'color_temp': 243, 'hs_color': (26.767, 32.827), 'rgb_color': (255, 208, 171), 'xy_color': (0.414, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CM7Z:al:JVQW:lght:08'
2023-08-26 18:03:47.590 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.kueche_rechts' is already in 'self.our_last_state_on_change' (01H8S9CM7Z:al:JVQW:lght:08) adding this state also
2023-08-26 18:03:48.601 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.kueche_links
2023-08-26 18:03:48.601 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.kueche_rechts
2023-08-26 18:03:48.602 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.schlafzimmer_tisch
2023-08-26 18:03:48.602 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.stehlampe
2023-08-26 18:03:48.602 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.tv
2023-08-26 18:03:56.766 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4115, 'color_temp': 243, 'hs_color': (26.767, 32.827), 'rgb_color': (255, 208, 171), 'xy_color': (0.414, 0.362), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CY6XFGHKDYD0VATRDF8X'
2023-08-26 18:03:57.783 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 245, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9CZ6P5X821BKS00TC8Z73'
2023-08-26 18:03:58.260 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CZNJSNC6E6AA9BREH2MR', is_skipped_hash='False'
2023-08-26 18:03:58.260 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CZNJSNC6E6AA9BREH2MR): entity_id=['light.bad'], params=brightness=255, color_temp=153, color_temp_kelvin=6535>', service_data='{'entity_id': ['light.bad'], 'params': {'brightness': 255, 'color_temp': 153, 'color_temp_kelvin': 6535}}'
2023-08-26 18:03:58.261 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Switch is off or light is already on for entity_id='light.bad', skipped='[]' (is_on='True', is_state='True', manual_control='True', switch._intercept='True')
2023-08-26 18:03:58.261 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.bad']'
2023-08-26 18:03:58.262 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CZNJSNC6E6AA9BREH2MR', is_skipped_hash='False'
2023-08-26 18:03:58.262 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CZNJSNC6E6AA9BREH2MR): entity_id=['light.kuche'], params=brightness=255, xy_color=(0.6915, 0.3083)>', service_data='{'entity_id': ['light.kuche'], 'params': {'brightness': 255, 'xy_color': (0.6915, 0.3083)}}'
2023-08-26 18:03:58.262 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.kuche', skipped='['light.kuche']'
2023-08-26 18:03:58.262 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.kuche']'
2023-08-26 18:03:58.262 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CZNJSNC6E6AA9BREH2MR', is_skipped_hash='False'
2023-08-26 18:03:58.262 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CZNJSNC6E6AA9BREH2MR): entity_id=['light.schlafzimmer'], params=brightness=255, color_temp=235, color_temp_kelvin=4255>', service_data='{'entity_id': ['light.schlafzimmer'], 'params': {'brightness': 255, 'color_temp': 235, 'color_temp_kelvin': 4255}}'
2023-08-26 18:03:58.263 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.schlafzimmer', skipped='['light.schlafzimmer']'
2023-08-26 18:03:58.263 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.schlafzimmer']'
2023-08-26 18:03:58.263 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01H8S9CZNJSNC6E6AA9BREH2MR', is_skipped_hash='False'
2023-08-26 18:03:58.263 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01H8S9CZNJSNC6E6AA9BREH2MR): entity_id=['light.wohnzimmer'], params=brightness=255, xy_color=(0.6915, 0.3083)>', service_data='{'entity_id': ['light.wohnzimmer'], 'params': {'brightness': 255, 'xy_color': (0.6915, 0.3083)}}'
2023-08-26 18:03:58.263 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.wohnzimmer', skipped='['light.wohnzimmer']'
2023-08-26 18:03:58.263 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.wohnzimmer']'
2023-08-26 18:03:58.263 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.bad']')' event with context.id='01H8S9CZNJSNC6E6AA9BREH2MR'
2023-08-26 18:03:58.812 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_links' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Links', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06K0ZYCN8GFY87R7FEJ'
2023-08-26 18:03:58.814 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06MR4KM8007FWR0BAJT'
2023-08-26 18:03:58.814 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_links' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Links', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06N1V1BY80VFVS32FRJ'
2023-08-26 18:03:58.814 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kueche_rechts' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Küche Rechts', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06NTB69Y5XGT57VX3CA'
2023-08-26 18:03:58.814 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.schlafzimmer_tisch' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['None', 'candle'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Schlafzimmer Tisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06PJ1QHYFT5MJBAC43N'
2023-08-26 18:03:58.814 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.schlafzimmer_tisch' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['None', 'candle'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4255, 'color_temp': 235, 'hs_color': (26.732, 30.439), 'rgb_color': (255, 211, 177), 'xy_color': (0.407, 0.36), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Schlafzimmer Tisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06QZJKCEW5K1BHS330S'
2023-08-26 18:03:58.815 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.stehlampe' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Stehlampe', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06SYFSTD1QJSB7FX7NP'
2023-08-26 18:03:58.815 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.tv' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 4032, 'color_temp': 248, 'hs_color': (26.798, 34.294), 'rgb_color': (255, 206, 167), 'xy_color': (0.419, 0.364), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'TV', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06T06V6FGV7EJ3B99Q9'
2023-08-26 18:03:58.815 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.stehlampe' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'Stehlampe', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06VW1TNVR1YSVJXZG2W'
2023-08-26 18:03:58.815 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.tv' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['None', 'candle', 'fire', 'unknown', 'sunrise'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.XY: 'xy'>], 'color_mode': <ColorMode.XY: 'xy'>, 'brightness': 255, 'hs_color': (10.118, 100.0), 'rgb_color': (255, 43, 0), 'xy_color': (0.6915, 0.3083), 'effect': 'None', 'mode': 'normal', 'dynamics': 'none', 'friendly_name': 'TV', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01H8S9D06V53WR258G90QSJXJS'
  1. Your Adaptive Lighting configuration:
interval: 90
transition: 45
initial_transition: 1
take_over_control: true
detect_non_ha_changes: true
autoreset_control_seconds: 0
only_once: false
adapt_only_on_bare_turn_on: true
separate_turn_on_commands: false
adapt_delay: 0
intercept: true
multi_light_intercept: true
  1. (If using Zigbee2MQTT), provide your configuration files (remove all personal information before posting):
    • devices.yaml
    • groups.yaml
    • configuration.yaml ⚠️; Warning REMOVE ALL of the PERSONAL INFORMATION BELOW before posting ⚠️;
      • mqtt: server:
      • mqtt: user:
      • mqtt: password:
      • advanced: pan_id:
      • advanced: network_key:
      • anything in log_syslog if you use this
    • Brand and model number of problematic light(s)


4.  Describe the bug and how to reproduce it:
I've a scene "alarm" which sets all rgb lights to red and all lights to 100% brightness. However when activating that scene while all lights are off AL immediately takes control. Only when activating the scene while the lights are already on, AL switches them to manually controlled.

Note: The log above contains both cases, the initial scene activation which is then overwritten as well as the second activation.
basnijholt commented 12 months ago

That is because of adapt_only_on_bare_turn_on: true. Check the docs entry on that :)

basnijholt commented 12 months ago

Oops, I misread the title. I will investigate.

basnijholt commented 11 months ago

@JN-Jones could you please share how the scene is set up? Do you perhaps use device_ids? My suspicion is that the scenes are called in a way, which I’m currently not listening for in AL.

giannoug commented 11 months ago

I believe this refers to Hue scenes, activated within the Hue app. I also have the same issue.

JN-Jones commented 11 months ago

Hue scenes is a separate issue: #435 - Haven't tested properly with those yet but had issues with them in the past as well.

@basnijholt I've set up the corresponding scene using the UI (bring all lights in the desired state and save as scene). I'll check whether configuring it via yaml works.

JN-Jones commented 11 months ago

Ok, seems this is not related to scenes but to a misunderstanding on my side. My lights are all hue lights so I also have the "room groups". However for AL I've only configured the individual lights as I usually use those in automations and so on. Only in this case I used the groups in the scene (as here I want all lights so, well, groups are easier). And for some reason I'm not sure anymore about I thought multi_light_intercept would handle this - though obviously the group configuration is not known by AL... End of story: Using the lights configured in AL in the scene as well works and marks all lights as manually controlled (using either UI or YAML directly).

basnijholt commented 11 months ago

Thanks for reporting back!

How do you think we could improve the docs to make sure this is clearer? 😄

JN-Jones commented 11 months ago

Uh, good question. There's already a section regarding groups in the common issues section, maybe add to the note that it's not only a problem if the group is configured in AL and the lights are controlled individually but also the other way around, if the group is used but individual lights are configured? And maybe add Hue somewhere in the heading, at first I skipped over that section because I assumed it was talking about networks managed directly in HA via the Zigbee integration.