basnijholt / adaptive-lighting

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

Manual control and reset doesnt work. #808

Open PskNorz opened 9 months ago

PskNorz commented 9 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:
023-10-08 13:25:19.120 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Setting up AdaptiveLighting with data: {'f8753d5220a952d72ac5a2ea3d099321': {'undo_update_listener': <function ConfigEntry.add_update_listener.<locals>.<lambda> at 0x7f8de08ae0>}} and config_entry <homeassistant.config_entries.ConfigEntry object at 0x7fa42d5b70>
2023-10-08 13:25:19.120 WARNING (MainThread) [custom_components.adaptive_lighting.switch] Deleting AdaptiveLighting switch 'default' because YAML defined switch has been removed from YAML configuration
2023-10-08 13:25:59.796 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Setting up AdaptiveLighting with data: {'46f8b59b73fe73236ac1ac4c66c32c72': {'undo_update_listener': <function ConfigEntry.add_update_listener.<locals>.<lambda> at 0x7f9197fce0>}} and config_entry <homeassistant.config_entries.ConfigEntry object at 0x7f777fcb80>
2023-10-08 13:25:59.805 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Set switch settings for lights '[]'. now using data: '{'lights': [], 'interval': datetime.timedelta(seconds=90), 'transition': 45, 'initial_transition': 1, 'min_brightness': 1, 'max_brightness': 100, 'min_color_temp': 2000, 'max_color_temp': 5500, 'prefer_rgb_color': False, 'sleep_brightness': 1, 'sleep_rgb_or_color_temp': 'color_temp', 'sleep_color_temp': 1000, 'sleep_rgb_color': [255, 56, 0], 'sleep_transition': 1, 'transition_until_sleep': False, 'sunrise_time': None, 'min_sunrise_time': None, 'max_sunrise_time': None, 'sunrise_offset': datetime.timedelta(0), 'sunset_time': None, 'min_sunset_time': None, 'max_sunset_time': None, 'sunset_offset': datetime.timedelta(0), 'brightness_mode': 'default', 'brightness_mode_time_dark': datetime.timedelta(seconds=900), 'brightness_mode_time_light': datetime.timedelta(seconds=3600), 'take_over_control': True, 'detect_non_ha_changes': False, 'autoreset_control_seconds': 0, 'only_once': False, 'adapt_only_on_bare_turn_on': False, 'separate_turn_on_commands': False, 'send_split_delay': 0, 'adapt_delay': 0, 'skip_redundant_commands': False, 'intercept': True, 'multi_light_intercept': True, 'include_config_in_attributes': False, 'name': 'Office'}'
2023-10-08 13:25:59.805 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting up with '[]', config_entry.data: '{'name': 'Office'}', config_entry.options: '{}', converted to '{'lights': [], 'interval': datetime.timedelta(seconds=90), 'transition': 45, 'initial_transition': 1, 'min_brightness': 1, 'max_brightness': 100, 'min_color_temp': 2000, 'max_color_temp': 5500, 'prefer_rgb_color': False, 'sleep_brightness': 1, 'sleep_rgb_or_color_temp': 'color_temp', 'sleep_color_temp': 1000, 'sleep_rgb_color': [255, 56, 0], 'sleep_transition': 1, 'transition_until_sleep': False, 'sunrise_time': None, 'min_sunrise_time': None, 'max_sunrise_time': None, 'sunrise_offset': datetime.timedelta(0), 'sunset_time': None, 'min_sunset_time': None, 'max_sunset_time': None, 'sunset_offset': datetime.timedelta(0), 'brightness_mode': 'default', 'brightness_mode_time_dark': datetime.timedelta(seconds=900), 'brightness_mode_time_light': datetime.timedelta(seconds=3600), 'take_over_control': True, 'detect_non_ha_changes': False, 'autoreset_control_seconds': 0, 'only_once': False, 'adapt_only_on_bare_turn_on': False, 'separate_turn_on_commands': False, 'send_split_delay': 0, 'adapt_delay': 0, 'skip_redundant_commands': False, 'intercept': True, 'multi_light_intercept': True, 'include_config_in_attributes': False, 'name': 'Office'}'.
2023-10-08 13:25:59.832 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Sleep Mode: Office: last state is <state switch.adaptive_lighting_sleep_mode_office=off; icon=mdi:sleep, friendly_name=Adaptive Lighting Sleep Mode: Office @ 2023-10-08T13:06:13.681806+03:00>
2023-10-08 13:25:59.832 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Sleep Mode: Office: Turning off
2023-10-08 13:25:59.834 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Color: Office: last state is <state switch.adaptive_lighting_adapt_color_office=on; icon=mdi:sun-thermometer, friendly_name=Adaptive Lighting Adapt Color: Office @ 2023-10-08T13:06:13.682387+03:00>
2023-10-08 13:25:59.834 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Color: Office: Turning on
2023-10-08 13:25:59.835 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Brightness: Office: last state is <state switch.adaptive_lighting_adapt_brightness_office=on; icon=mdi:brightness-4, friendly_name=Adaptive Lighting Adapt Brightness: Office @ 2023-10-08T13:06:13.682812+03:00>
2023-10-08 13:25:59.835 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Brightness: Office: Turning on
2023-10-08 13:25:59.836 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Called '_setup_listeners'
2023-10-08 13:25:59.837 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Cancelled '_setup_listeners'
2023-10-08 13:25:59.838 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Called 'async_turn_on', current state is 'None'
2023-10-08 13:25:59.838 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Called '_setup_listeners'
2023-10-08 13:25:59.839 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7D51GY:al:J5TG:trn_:00' lights: 'None', transition: '1', force: 'True'
2023-10-08 13:25:59.842 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '[]'
2023-10-08 13:26:25.758 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Setting up AdaptiveLighting with data: {'46f8b59b73fe73236ac1ac4c66c32c72': {'undo_update_listener': <function ConfigEntry.add_update_listener.<locals>.<lambda> at 0x7f76cf94e0>}} and config_entry <homeassistant.config_entries.ConfigEntry object at 0x7f777fcb80>
2023-10-08 13:26:25.766 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Set switch settings for lights '['light.yeelight_color4_0x00000000157f1e6d']'. now using data: '{'lights': ['light.yeelight_color4_0x00000000157f1e6d'], 'interval': datetime.timedelta(seconds=90), 'transition': 45.0, 'initial_transition': 1.0, 'min_brightness': 1, 'max_brightness': 100, 'min_color_temp': 2000, 'max_color_temp': 5500, 'prefer_rgb_color': False, 'sleep_brightness': 1, 'sleep_rgb_or_color_temp': 'color_temp', 'sleep_color_temp': 1000, 'sleep_rgb_color': [255, 56, 0], 'sleep_transition': 1.0, 'transition_until_sleep': False, 'sunrise_time': None, 'min_sunrise_time': None, 'max_sunrise_time': None, 'sunrise_offset': datetime.timedelta(0), 'sunset_time': None, 'min_sunset_time': None, 'max_sunset_time': None, 'sunset_offset': datetime.timedelta(0), 'brightness_mode': 'default', 'brightness_mode_time_dark': datetime.timedelta(seconds=900), 'brightness_mode_time_light': datetime.timedelta(seconds=3600), 'take_over_control': True, 'detect_non_ha_changes': False, 'autoreset_control_seconds': 180, 'only_once': False, 'adapt_only_on_bare_turn_on': False, 'separate_turn_on_commands': False, 'send_split_delay': 0, 'adapt_delay': 0.0, 'skip_redundant_commands': False, 'intercept': True, 'multi_light_intercept': True, 'include_config_in_attributes': True, 'name': 'Office'}'
2023-10-08 13:26:25.767 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting up with '['light.yeelight_color4_0x00000000157f1e6d']', config_entry.data: '{'name': 'Office'}', config_entry.options: '{'lights': ['light.yeelight_color4_0x00000000157f1e6d'], 'interval': 90, 'transition': 45.0, 'initial_transition': 1.0, 'min_brightness': 1, 'max_brightness': 100, 'min_color_temp': 2000, 'max_color_temp': 5500, 'prefer_rgb_color': False, 'sleep_brightness': 1, 'sleep_rgb_or_color_temp': 'color_temp', 'sleep_color_temp': 1000, 'sleep_rgb_color': [255, 56, 0], 'sleep_transition': 1.0, 'transition_until_sleep': False, 'sunrise_time': 'None', 'min_sunrise_time': 'None', 'max_sunrise_time': 'None', 'sunrise_offset': 0, 'sunset_time': 'None', 'min_sunset_time': 'None', 'max_sunset_time': 'None', 'sunset_offset': 0, 'brightness_mode': 'default', 'brightness_mode_time_dark': 900, 'brightness_mode_time_light': 3600, 'take_over_control': True, 'detect_non_ha_changes': False, 'autoreset_control_seconds': 180, 'only_once': False, 'adapt_only_on_bare_turn_on': False, 'separate_turn_on_commands': False, 'send_split_delay': 0, 'adapt_delay': 0.0, 'skip_redundant_commands': False, 'intercept': True, 'multi_light_intercept': True, 'include_config_in_attributes': True}', converted to '{'lights': ['light.yeelight_color4_0x00000000157f1e6d'], 'interval': datetime.timedelta(seconds=90), 'transition': 45.0, 'initial_transition': 1.0, 'min_brightness': 1, 'max_brightness': 100, 'min_color_temp': 2000, 'max_color_temp': 5500, 'prefer_rgb_color': False, 'sleep_brightness': 1, 'sleep_rgb_or_color_temp': 'color_temp', 'sleep_color_temp': 1000, 'sleep_rgb_color': [255, 56, 0], 'sleep_transition': 1.0, 'transition_until_sleep': False, 'sunrise_time': None, 'min_sunrise_time': None, 'max_sunrise_time': None, 'sunrise_offset': datetime.timedelta(0), 'sunset_time': None, 'min_sunset_time': None, 'max_sunset_time': None, 'sunset_offset': datetime.timedelta(0), 'brightness_mode': 'default', 'brightness_mode_time_dark': datetime.timedelta(seconds=900), 'brightness_mode_time_light': datetime.timedelta(seconds=3600), 'take_over_control': True, 'detect_non_ha_changes': False, 'autoreset_control_seconds': 180, 'only_once': False, 'adapt_only_on_bare_turn_on': False, 'separate_turn_on_commands': False, 'send_split_delay': 0, 'adapt_delay': 0.0, 'skip_redundant_commands': False, 'intercept': True, 'multi_light_intercept': True, 'include_config_in_attributes': True, 'name': 'Office'}'.
2023-10-08 13:26:25.774 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Sleep Mode: Office: last state is <state switch.adaptive_lighting_sleep_mode_office=off; icon=mdi:sleep, friendly_name=Adaptive Lighting Sleep Mode: Office @ 2023-10-08T13:25:59.833183+03:00>
2023-10-08 13:26:25.774 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Sleep Mode: Office: Turning off
2023-10-08 13:26:25.775 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Color: Office: last state is <state switch.adaptive_lighting_adapt_color_office=on; icon=mdi:sun-thermometer, friendly_name=Adaptive Lighting Adapt Color: Office @ 2023-10-08T13:25:59.834471+03:00>
2023-10-08 13:26:25.775 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Color: Office: Turning on
2023-10-08 13:26:25.776 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Brightness: Office: last state is <state switch.adaptive_lighting_adapt_brightness_office=on; icon=mdi:brightness-4, friendly_name=Adaptive Lighting Adapt Brightness: Office @ 2023-10-08T13:25:59.835853+03:00>
2023-10-08 13:26:25.776 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Adaptive Lighting Adapt Brightness: Office: Turning on
2023-10-08 13:26:25.778 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Called '_setup_listeners'
2023-10-08 13:26:25.778 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Cancelled '_setup_listeners'
2023-10-08 13:26:25.778 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Called 'async_turn_on', current state is 'None'
2023-10-08 13:26:25.778 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Called '_setup_listeners'
2023-10-08 13:26:25.779 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7D5TVK:al:J5TG:trn_:00' lights: 'None', transition: '1.0', force: 'True'
2023-10-08 13:26:25.784 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:26:25.784 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.yeelight_color4_0x00000000157f1e6d' with transition 1.0 and context.id=01HC7D5TVK:al:J5TG:trn_:00
2023-10-08 13:26:25.788 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting color_temp of light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:26:25.789 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.yeelight_color4_0x00000000157f1e6d with service data {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 1.0, 'brightness': 255, 'color_temp_kelvin': 5495}
2023-10-08 13:26:25.789 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.yeelight_color4_0x00000000157f1e6d, context_id=01HC7D5TVK:al:J5TG:trn_:00, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-10-08 13:26:25.791 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 1.0, 'brightness': 255, 'color_temp_kelvin': 5495} with context.id='01HC7D5TVK:al:J5TG:trn_:00'
2023-10-08 13:26:25.792 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7D5TVK:al:J5TG:trn_:00'
2023-10-08 13:26:25.792 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7D5TVK:al:J5TG:trn_:00', is_skipped_hash='False'
2023-10-08 13:26:32.739 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7D61N23DDWPQ63RP0VY71P', is_skipped_hash='False'
2023-10-08 13:26:32.739 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01HC7D61N23DDWPQ63RP0VY71P): entity_id=['light.yeelight_color4_0x00000000157f1e6d'], params=brightness=94>', service_data='{'entity_id': ['light.yeelight_color4_0x00000000157f1e6d'], 'params': {'brightness': 94}}'
2023-10-08 13:26:32.741 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Switch is off or light is already on for entity_id='light.yeelight_color4_0x00000000157f1e6d', skipped='[]' (is_on='True', is_state='True', manual_control='False', switch._intercept='True')
2023-10-08 13:26:32.741 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:26:32.742 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7D61N23DDWPQ63RP0VY71P'
2023-10-08 13:26:32.761 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.yeelight_color4_0x00000000157f1e6d' 'state_changed' event: '{'min_color_temp_kelvin': 1700, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 588, 'effect_list': ['Strobe color', 'Police', 'Christmas', 'RGB', 'Random Loop', 'Fast Random Loop', 'LSD', 'Slowdown', 'Night Mode', 'Date Night', 'Movie', 'Sunrise', 'Sunset', 'Romance', 'Happy Birthday', 'Disco', 'Strobe epilepsy!', 'Alarm', 'Police2', 'WhatsApp', 'Facebook', 'Twitter', 'Home', 'Candle Flicker', 'Slow Temp', 'Stop'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>, <ColorMode.RGB: 'rgb'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 92, 'color_temp_kelvin': 5524, 'color_temp': 181, 'hs_color': (28.004, 12.556), 'rgb_color': (255, 237, 222), 'xy_color': (0.354, 0.343), 'flowing': False, 'music_mode': False, 'icon': 'hass:lamp', 'friendly_name': 'Yeelight Color4 0x157f1e6d', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01HC7D61N23DDWPQ63RP0VY71P'
2023-10-08 13:27:56.285 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7D8K7X:al:J5TG:ntrv:01' lights: 'None', transition: '45.0', force: 'False'
2023-10-08 13:27:56.288 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:27:56.288 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01HC7D61N23DDWPQ63RP0VY71P'
2023-10-08 13:27:56.288 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] 'adaptive_lighting.manual_control' event fired for switch.adaptive_lighting_office for light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:27:56.288 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Marking 'light.yeelight_color4_0x00000000157f1e6d' as manually controlled.
2023-10-08 13:27:56.289 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] 'light.yeelight_color4_0x00000000157f1e6d' was already on and 'light.turn_on' was not called by the adaptive_lighting integration (context.id='01HC7D61N23DDWPQ63RP0VY71P'), the Adaptive Lighting will stop adapting the light until the switch or the light turns off and then on again.
2023-10-08 13:27:56.289 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: 'light.yeelight_color4_0x00000000157f1e6d' is being manually controlled, stop adapting, context.id=01HC7D8K7X:al:J5TG:ntrv:01.
2023-10-08 13:28:06.365 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Called 'adaptive_lighting.set_manual_control' service with '{'entity_id': ['switch.adaptive_lighting_office'], 'lights': ['light.yeelight_color4_0x00000000157f1e6d'], 'manual_control': False}'
2023-10-08 13:28:06.366 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7D8X2Y:al:J5TG:srvc:02' lights: '['light.yeelight_color4_0x00000000157f1e6d']', transition: '1.0', force: 'True'
2023-10-08 13:28:06.378 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:28:06.378 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01HC7D61N23DDWPQ63RP0VY71P'
2023-10-08 13:28:06.378 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.yeelight_color4_0x00000000157f1e6d' with transition 1.0 and context.id=01HC7D8X2Y:al:J5TG:srvc:02
2023-10-08 13:28:06.418 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting color_temp of light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:28:06.418 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.yeelight_color4_0x00000000157f1e6d with service data {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 1.0, 'brightness': 255, 'color_temp_kelvin': 5490}
2023-10-08 13:28:06.418 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.yeelight_color4_0x00000000157f1e6d, context_id=01HC7D8X2Y:al:J5TG:srvc:02, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-10-08 13:28:06.419 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 1.0, 'brightness': 255, 'color_temp_kelvin': 5490} with context.id='01HC7D8X2Y:al:J5TG:srvc:02'
2023-10-08 13:28:06.420 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7D8X2Y:al:J5TG:srvc:02'
2023-10-08 13:28:06.420 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7D8X2Y:al:J5TG:srvc:02', is_skipped_hash='False'
2023-10-08 13:28:06.475 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.yeelight_color4_0x00000000157f1e6d' 'state_changed' event: '{'min_color_temp_kelvin': 1700, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 588, 'effect_list': ['Strobe color', 'Police', 'Christmas', 'RGB', 'Random Loop', 'Fast Random Loop', 'LSD', 'Slowdown', 'Night Mode', 'Date Night', 'Movie', 'Sunrise', 'Sunset', 'Romance', 'Happy Birthday', 'Disco', 'Strobe epilepsy!', 'Alarm', 'Police2', 'WhatsApp', 'Facebook', 'Twitter', 'Home', 'Candle Flicker', 'Slow Temp', 'Stop'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>, <ColorMode.RGB: 'rgb'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 92, 'color_temp_kelvin': 5494, 'color_temp': 182, 'hs_color': (27.913, 12.917), 'rgb_color': (255, 237, 222), 'xy_color': (0.354, 0.343), 'flowing': False, 'music_mode': False, 'icon': 'hass:lamp', 'friendly_name': 'Yeelight Color4 0x157f1e6d', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01HC7D8X2Y:al:J5TG:srvc:02'
2023-10-08 13:28:06.476 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.yeelight_color4_0x00000000157f1e6d=on; min_color_temp_kelvin=1700, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=588, effect_list=['Strobe color', 'Police', 'Christmas', 'RGB', 'Random Loop', 'Fast Random Loop', 'LSD', 'Slowdown', 'Night Mode', 'Date Night', 'Movie', 'Sunrise', 'Sunset', 'Romance', 'Happy Birthday', 'Disco', 'Strobe epilepsy!', 'Alarm', 'Police2', 'WhatsApp', 'Facebook', 'Twitter', 'Home', 'Candle Flicker', 'Slow Temp', 'Stop'], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>, <ColorMode.RGB: 'rgb'>], color_mode=color_temp, brightness=92, color_temp_kelvin=5494, color_temp=182, hs_color=(27.913, 12.917), rgb_color=(255, 237, 222), xy_color=(0.354, 0.343), flowing=False, music_mode=False, icon=hass:lamp, friendly_name=Yeelight Color4 0x157f1e6d, supported_features=44 @ 2023-10-08T13:25:19.216609+03:00>' found for light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:28:06.511 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:28:06.572 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.yeelight_color4_0x00000000157f1e6d' 'state_changed' event: '{'min_color_temp_kelvin': 1700, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 588, 'effect_list': ['Strobe color', 'Police', 'Christmas', 'RGB', 'Random Loop', 'Fast Random Loop', 'LSD', 'Slowdown', 'Night Mode', 'Date Night', 'Movie', 'Sunrise', 'Sunset', 'Romance', 'Happy Birthday', 'Disco', 'Strobe epilepsy!', 'Alarm', 'Police2', 'WhatsApp', 'Facebook', 'Twitter', 'Home', 'Candle Flicker', 'Slow Temp', 'Stop'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>, <ColorMode.RGB: 'rgb'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 5494, 'color_temp': 182, 'hs_color': (27.913, 12.917), 'rgb_color': (255, 237, 222), 'xy_color': (0.354, 0.343), 'flowing': False, 'music_mode': False, 'icon': 'hass:lamp', 'friendly_name': 'Yeelight Color4 0x157f1e6d', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01HC7D8X2Y:al:J5TG:srvc:02'
2023-10-08 13:28:06.572 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.yeelight_color4_0x00000000157f1e6d' is already in 'self.our_last_state_on_change' (01HC7D8X2Y:al:J5TG:srvc:02) adding this state also
2023-10-08 13:28:07.530 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:29:26.827 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7DBBNA:al:J5TG:ntrv:03' lights: 'None', transition: '45.0', force: 'False'
2023-10-08 13:29:26.830 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:29:26.830 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01HC7D8X2Y:al:J5TG:srvc:02'
2023-10-08 13:29:26.830 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.yeelight_color4_0x00000000157f1e6d' with transition 45.0 and context.id=01HC7DBBNA:al:J5TG:ntrv:03
2023-10-08 13:29:26.838 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting color_temp of light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:29:26.838 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.yeelight_color4_0x00000000157f1e6d with service data {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 45.0, 'brightness': 255, 'color_temp_kelvin': 5490}
2023-10-08 13:29:26.838 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.yeelight_color4_0x00000000157f1e6d, context_id=01HC7DBBNA:al:J5TG:ntrv:03, sleep_time=45.0, force=False, max_length=1, which=both, initial_sleep=False)
2023-10-08 13:29:26.846 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 45.0, 'brightness': 255, 'color_temp_kelvin': 5490} with context.id='01HC7DBBNA:al:J5TG:ntrv:03'
2023-10-08 13:29:26.875 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7DBBNA:al:J5TG:ntrv:03'
2023-10-08 13:29:26.876 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7DBBNA:al:J5TG:ntrv:03', is_skipped_hash='False'
2023-10-08 13:29:56.535 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7DC8NQNYP6SPXG1H9K00TC', is_skipped_hash='False'
2023-10-08 13:29:56.536 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01HC7DC8NQNYP6SPXG1H9K00TC): entity_id=['light.yeelight_color4_0x00000000157f1e6d'], params=brightness=89>', service_data='{'entity_id': ['light.yeelight_color4_0x00000000157f1e6d'], 'params': {'brightness': 89}}'
2023-10-08 13:29:56.536 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Switch is off or light is already on for entity_id='light.yeelight_color4_0x00000000157f1e6d', skipped='[]' (is_on='True', is_state='True', manual_control='False', switch._intercept='True')
2023-10-08 13:29:56.536 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:29:56.537 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7DC8NQNYP6SPXG1H9K00TC'
2023-10-08 13:29:56.579 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.yeelight_color4_0x00000000157f1e6d' 'state_changed' event: '{'min_color_temp_kelvin': 1700, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 588, 'effect_list': ['Strobe color', 'Police', 'Christmas', 'RGB', 'Random Loop', 'Fast Random Loop', 'LSD', 'Slowdown', 'Night Mode', 'Date Night', 'Movie', 'Sunrise', 'Sunset', 'Romance', 'Happy Birthday', 'Disco', 'Strobe epilepsy!', 'Alarm', 'Police2', 'WhatsApp', 'Facebook', 'Twitter', 'Home', 'Candle Flicker', 'Slow Temp', 'Stop'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>, <ColorMode.RGB: 'rgb'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 87, 'color_temp_kelvin': 5494, 'color_temp': 182, 'hs_color': (27.913, 12.917), 'rgb_color': (255, 237, 222), 'xy_color': (0.354, 0.343), 'flowing': False, 'music_mode': False, 'icon': 'hass:lamp', 'friendly_name': 'Yeelight Color4 0x157f1e6d', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01HC7DC8NQNYP6SPXG1H9K00TC'
2023-10-08 13:30:57.322 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7DE41A:al:J5TG:ntrv:04' lights: 'None', transition: '45.0', force: 'False'
2023-10-08 13:30:57.327 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:30:57.328 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01HC7DC8NQNYP6SPXG1H9K00TC'
2023-10-08 13:30:57.330 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] 'adaptive_lighting.manual_control' event fired for switch.adaptive_lighting_office for light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:30:57.330 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Marking 'light.yeelight_color4_0x00000000157f1e6d' as manually controlled.
2023-10-08 13:30:57.331 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] 'light.yeelight_color4_0x00000000157f1e6d' was already on and 'light.turn_on' was not called by the adaptive_lighting integration (context.id='01HC7DC8NQNYP6SPXG1H9K00TC'), the Adaptive Lighting will stop adapting the light until the switch or the light turns off and then on again.
2023-10-08 13:30:57.331 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: 'light.yeelight_color4_0x00000000157f1e6d' is being manually controlled, stop adapting, context.id=01HC7DE41A:al:J5TG:ntrv:04.
2023-10-08 13:31:07.346 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Called 'adaptive_lighting.set_manual_control' service with '{'entity_id': ['switch.adaptive_lighting_office'], 'lights': ['light.yeelight_color4_0x00000000157f1e6d'], 'manual_control': False}'
2023-10-08 13:31:07.347 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7DEDTK:al:J5TG:srvc:05' lights: '['light.yeelight_color4_0x00000000157f1e6d']', transition: '1.0', force: 'True'
2023-10-08 13:31:07.355 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:31:07.356 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01HC7DC8NQNYP6SPXG1H9K00TC'
2023-10-08 13:31:07.356 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.yeelight_color4_0x00000000157f1e6d' with transition 1.0 and context.id=01HC7DEDTK:al:J5TG:srvc:05
2023-10-08 13:31:07.366 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting color_temp of light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:31:07.366 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.yeelight_color4_0x00000000157f1e6d with service data {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 1.0, 'brightness': 255, 'color_temp_kelvin': 5490}
2023-10-08 13:31:07.366 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.yeelight_color4_0x00000000157f1e6d, context_id=01HC7DEDTK:al:J5TG:srvc:05, sleep_time=1.0, force=True, max_length=1, which=both, initial_sleep=False)
2023-10-08 13:31:07.367 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 1.0, 'brightness': 255, 'color_temp_kelvin': 5490} with context.id='01HC7DEDTK:al:J5TG:srvc:05'
2023-10-08 13:31:07.368 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7DEDTK:al:J5TG:srvc:05'
2023-10-08 13:31:07.368 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7DEDTK:al:J5TG:srvc:05', is_skipped_hash='False'
2023-10-08 13:31:07.389 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.yeelight_color4_0x00000000157f1e6d' 'state_changed' event: '{'min_color_temp_kelvin': 1700, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 588, 'effect_list': ['Strobe color', 'Police', 'Christmas', 'RGB', 'Random Loop', 'Fast Random Loop', 'LSD', 'Slowdown', 'Night Mode', 'Date Night', 'Movie', 'Sunrise', 'Sunset', 'Romance', 'Happy Birthday', 'Disco', 'Strobe epilepsy!', 'Alarm', 'Police2', 'WhatsApp', 'Facebook', 'Twitter', 'Home', 'Candle Flicker', 'Slow Temp', 'Stop'], 'supported_color_modes': [<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>, <ColorMode.RGB: 'rgb'>], 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 255, 'color_temp_kelvin': 5494, 'color_temp': 182, 'hs_color': (27.913, 12.917), 'rgb_color': (255, 237, 222), 'xy_color': (0.354, 0.343), 'flowing': False, 'music_mode': False, 'icon': 'hass:lamp', 'friendly_name': 'Yeelight Color4 0x157f1e6d', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01HC7DEDTK:al:J5TG:srvc:05'
2023-10-08 13:31:07.389 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.yeelight_color4_0x00000000157f1e6d=on; min_color_temp_kelvin=1700, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=588, effect_list=['Strobe color', 'Police', 'Christmas', 'RGB', 'Random Loop', 'Fast Random Loop', 'LSD', 'Slowdown', 'Night Mode', 'Date Night', 'Movie', 'Sunrise', 'Sunset', 'Romance', 'Happy Birthday', 'Disco', 'Strobe epilepsy!', 'Alarm', 'Police2', 'WhatsApp', 'Facebook', 'Twitter', 'Home', 'Candle Flicker', 'Slow Temp', 'Stop'], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.HS: 'hs'>, <ColorMode.RGB: 'rgb'>], color_mode=color_temp, brightness=255, color_temp_kelvin=5494, color_temp=182, hs_color=(27.913, 12.917), rgb_color=(255, 237, 222), xy_color=(0.354, 0.343), flowing=False, music_mode=False, icon=hass:lamp, friendly_name=Yeelight Color4 0x157f1e6d, supported_features=44 @ 2023-10-08T13:25:19.216609+03:00>' found for light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:31:07.390 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:31:08.399 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:32:27.823 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7DGWDF:al:J5TG:ntrv:06' lights: 'None', transition: '45.0', force: 'False'
2023-10-08 13:32:27.827 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:32:27.828 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01HC7DEDTK:al:J5TG:srvc:05'
2023-10-08 13:32:27.828 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.yeelight_color4_0x00000000157f1e6d' with transition 45.0 and context.id=01HC7DGWDF:al:J5TG:ntrv:06
2023-10-08 13:32:27.839 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting color_temp of light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:32:27.839 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.yeelight_color4_0x00000000157f1e6d with service data {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 45.0, 'brightness': 255, 'color_temp_kelvin': 5485}
2023-10-08 13:32:27.840 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.yeelight_color4_0x00000000157f1e6d, context_id=01HC7DGWDF:al:J5TG:ntrv:06, sleep_time=45.0, force=False, max_length=1, which=both, initial_sleep=False)
2023-10-08 13:32:27.840 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 45.0, 'brightness': 255, 'color_temp_kelvin': 5485} with context.id='01HC7DGWDF:al:J5TG:ntrv:06'
2023-10-08 13:32:27.841 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7DGWDF:al:J5TG:ntrv:06'
2023-10-08 13:32:27.842 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7DGWDF:al:J5TG:ntrv:06', is_skipped_hash='False'
2023-10-08 13:33:58.324 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: '_update_attrs_and_maybe_adapt_lights' called with context.id='01HC7DKMSM:al:J5TG:ntrv:07' lights: 'None', transition: '45.0', force: 'False'
2023-10-08 13:33:58.332 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: filtered_lights: '['light.yeelight_color4_0x00000000157f1e6d']'
2023-10-08 13:33:58.333 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01HC7DGWDF:al:J5TG:ntrv:06'
2023-10-08 13:33:58.333 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.yeelight_color4_0x00000000157f1e6d' with transition 45.0 and context.id=01HC7DKMSM:al:J5TG:ntrv:07
2023-10-08 13:33:58.341 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Setting color_temp of light light.yeelight_color4_0x00000000157f1e6d
2023-10-08 13:33:58.341 DEBUG (MainThread) [custom_components.adaptive_lighting.adaptation_utils] Preparing adaptation data for light.yeelight_color4_0x00000000157f1e6d with service data {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 45.0, 'brightness': 255, 'color_temp_kelvin': 5485}
2023-10-08 13:33:58.341 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.yeelight_color4_0x00000000157f1e6d, context_id=01HC7DKMSM:al:J5TG:ntrv:07, sleep_time=45.0, force=False, max_length=1, which=both, initial_sleep=False)
2023-10-08 13:33:58.342 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Office: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.yeelight_color4_0x00000000157f1e6d', 'transition': 45.0, 'brightness': 255, 'color_temp_kelvin': 5485} with context.id='01HC7DKMSM:al:J5TG:ntrv:07'
2023-10-08 13:33:58.343 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.yeelight_color4_0x00000000157f1e6d']')' event with context.id='01HC7DKMSM:al:J5TG:ntrv:07'
2023-10-08 13:33:58.343 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01HC7DKMSM:al:J5TG:ntrv:07', is_skipped_hash='False'
  1. Your Adaptive Lighting configuration:
  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)
      
      configuration:
      lights:
    • light.yeelight_color4_0x00000000157f1e6d interval: 90 transition: 45 initial_transition: 1 min_brightness: 1 max_brightness: 100 min_color_temp: 2000 max_color_temp: 5500 prefer_rgb_color: false sleep_brightness: 1 sleep_rgb_or_color_temp: color_temp sleep_color_temp: 1000 sleep_rgb_color:
    • 255
    • 56
    • 0 sleep_transition: 1 transition_until_sleep: false sunrise_time: null min_sunrise_time: null max_sunrise_time: null sunrise_offset: 0 sunset_time: null min_sunset_time: null max_sunset_time: null sunset_offset: 0 brightness_mode: default brightness_mode_time_dark: 900 brightness_mode_time_light: 3600 take_over_control: true detect_non_ha_changes: false autoreset_control_seconds: 180 only_once: false adapt_only_on_bare_turn_on: false separate_turn_on_commands: false send_split_delay: 0 adapt_delay: 0 skip_redundant_commands: false intercept: true multi_light_intercept: true include_config_in_attributes: true
  2. Describe the bug and how to reproduce it:

I trying to set a light, i use all the defaults values. When the lights in on and is being adapting if i dim the light manually or change the colour after a while its going back to adoption. I tried to disable take_over_control, same thing.

If i change the autoreset_control from 0 to 180 ( for testing ) it doesnt work at all

  1. Steps to reproduce the behavior: