Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AL dim to 1% #1135

Open
lucasgariglia opened this issue Dec 11, 2024 · 21 comments
Open

AL dim to 1% #1135

lucasgariglia opened this issue Dec 11, 2024 · 21 comments

Comments

@lucasgariglia
Copy link

Hi there, from today my living room hue lights always dim to 1%. I don't understand what's the issue, all my automations are correct.
Thanks. Luca.

@tjuel
Copy link

tjuel commented Dec 13, 2024

I'm experiencing the same thing. I went into settings and Sleep Mode is enabled to 1%. The thing is when I disable Sleep Mode and hit submit, it autochecks sleep mode again when I go back into configuration. I set sleep mode to my typical min brightness (50%) and it stays there.

I hope this helps for an interim fix.

@Mariuss811
Copy link

I do also have the same issue. The Lights turn to Sleep mode Brightness after some time and a second light turn on from my Motion Sensor Automation.

@Mariuss811
Copy link

I have my living room lights in one z2m group, so I don't have to bother with adding or deleting light in all my automations.
Here is some logging from that exact moment:

2024-12-16 09:47:43.363 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
(0) _service_interceptor_turn_on_handler:
    call.context.id='01JF7ADR7ZANEJDV30R7BBY8ZP',
    is_skipped_hash='False'

2024-12-16 09:47:43.364 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
(1) _service_interceptor_turn_on_handler:
    call='<ServiceCall light.turn_on (c:01JF7ADR7ZANEJDV30R7BBY8ZP):
          entity_id=['light.wohnzimmer'], params=transition=2.0>',
    service_data='{'entity_id': ['light.wohnzimmer'], 'params': {'transition': 2.0}}'

2024-12-16 09:47:43.364 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
No switch found for entity_id='light.wohnzimmer', skipped='['light.wohnzimmer']'

2024-12-16 09:47:43.364 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
(2) _service_interceptor_turn_on_handler:
    switch_to_eids='{}', skipped='['light.wohnzimmer']'

2024-12-16 09:47:43.693 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
Detected a 'light.fenster' 'state_changed' event:
{
    'min_color_temp_kelvin': 2000,
    'max_color_temp_kelvin': 6535,
    'min_mireds': 153,
    'max_mireds': 500,
    'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'],
    'supported_color_modes': ['color_temp', 'xy'],
    'effect': None,
    'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>,
    'brightness': 51,
    'color_temp_kelvin': 2865,
    'color_temp': 349,
    'hs_color': (28.062, 60.691),
    'rgb_color': (255, 173, 100),
    'xy_color': (0.508, 0.386),
    'color': {'h': 33, 'hue': 33, 's': 78, 'saturation': 78, 'x': 0.4472, 'y': 0.4073},
    'last_seen': '2024-12-16T09:46:45+01:00',
    'linkquality': 65,
    'power_on_behavior': None,
    'update': {'installed_version': 16787714, 'latest_version': 16787714, 'state': 'idle'},
    'update_available': False,
    'icon': 'hue:floor-spot',
    'friendly_name': 'Fenster',
    'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>
}
with context.id='01JF7ADRJDJTDJ7BG3VR26X0EV'

2024-12-16 09:47:43.700 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
Detected a 'light.stehlampe_2' 'state_changed' event:
{
    'min_color_temp_kelvin': 2202,
    'max_color_temp_kelvin': 6535,
    'min_mireds': 153,
    'max_mireds': 454,
    'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'],
    'supported_color_modes': ['color_temp'],
    'effect': None,
    'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>,
    'brightness': 51,
    'color_temp_kelvin': 2865,
    'color_temp': 349,
    'hs_color': (28.062, 60.691),
    'rgb_color': (255, 173, 100),
    'xy_color': (0.508, 0.386),
    'last_seen': '2024-12-16T09:46:45+01:00',
    'linkquality': 98,
    'power_on_behavior': None,
    'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'},
    'update_available': False,
    'friendly_name': 'Stehlampe_2',
    'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>
}
with context.id='01JF7ADRJM8R46NRAW3R3611H2'

2024-12-16 09:47:43.708 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
Detected a 'light.stehlampe_1' 'state_changed' event:
(Similar structure as 'light.stehlampe_2', with respective details)

2024-12-16 09:47:43.713 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
Detected a 'light.schreibtisch' 'state_changed' event:
(Similar structure, adjusted values)

2024-12-16 09:47:43.717 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
Detected a 'light.deckenlampe_wohnzimmer' 'state_changed' event:
(Similar structure, adjusted values)

2024-12-16 09:47:43.721 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
Detected a 'light.stehlampe_3' 'state_changed' event:
(Similar structure, adjusted values)

After some time I saw that the is some info about manual control but I didn't change any settings:

2024-12-16 09:57:17.514 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: '_update_attrs_and_maybe_adapt_lights' called with context.id='01JF7AZ8YA:al:K5XW:ntrv:08' lights: 'None', transition: '45.0', force: 'False'
2024-12-16 09:57:17.515 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: filtered_lights: '['light.deckenlampe_wohnzimmer', 'light.fenster', 'light.schreibtisch', 'light.stehlampe_1', 'light.stehlampe_2', 'light.stehlampe_3']'
2024-12-16 09:57:17.516 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: 'light.deckenlampe_wohnzimmer' is being manually controlled, stop adapting, context.id=01JF7AZ8YA:al:K5XW:ntrv:08.
2024-12-16 09:57:17.516 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: 'light.fenster' is being manually controlled, stop adapting, context.id=01JF7AZ8YA:al:K5XW:ntrv:08.
2024-12-16 09:57:17.516 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: 'light.schreibtisch' is being manually controlled, stop adapting, context.id=01JF7AZ8YA:al:K5XW:ntrv:08.
2024-12-16 09:57:17.516 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: 'light.stehlampe_1' is being manually controlled, stop adapting, context.id=01JF7AZ8YA:al:K5XW:ntrv:08.
2024-12-16 09:57:17.516 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: 'light.stehlampe_2' is being manually controlled, stop adapting, context.id=01JF7AZ8YA:al:K5XW:ntrv:08.
2024-12-16 09:57:17.516 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Wohnzimmer: 'light.stehlampe_3' is being manually controlled, stop adapting, context.id=01JF7AZ8YA:al:K5XW:ntrv:08.

So as far as I understand the light should be adapted by 51% Brightness, but they set to 20% which is my configured sleep brightness.

@djurny
Copy link

djurny commented Dec 16, 2024

Hi @Mariuss811,
Just to rule out some things, can you check any/all of the following:

  • Hue scenes, Zigbee scenes, HASS scenes that include these lights. If they are part of any scene, remove them from it.
  • Zigbee group membership of any of these lights. If any are part of any Zigbee group, remove them from it (usually by re-pairing them).
  • Zigbee settings of these lights, in particular the current_level_startup and it's execute_if_off settings.
  • HASS state logging of these lights. Do you see any state change that was not done by AL?
  • Your Zigbee bridge status, does it restart or reboot?
  • Do any of your lights do a power cycle or reboot? (Might not be visible in any logging without constant polling.)
2024-12-16 09:47:43.364 DEBUG (MainThread) [custom_components.adaptive_lighting.switch]
No switch found for entity_id='light.wohnzimmer', skipped='['light.wohnzimmer']'

Seems like a light.turn_on was detected to a light that was not controlled by AL (the living room light).
Can you show the grouping of the lights you have set up? And which lights will dim to 1%?

Edit: You mentioned you had all your living room lights in a Zigbee group, which lights did you configure for AL? I had some odd effects myself when I had either HASS or Zigbee light groups, but configured AL to control the lights seperately.

For example:

light:
  - platform: group
    name: "Bunch 'o lights"
    entities:
      - light.here
      - light.there
      - light.anywhere
#...
adaptive_lighting:
  - name: "Adaptive Lighting"
    lights:
    - light.there
    transition: 45
#...

Or the other way around:

light:
  - platform: group
    name: "Bunch 'o lights"
    entities:
      - light.here
      - light.there
      - light.anywhere
#...
adaptive_lighting:
  - name: "Adaptive Lighting"
    lights:
    - light.bunch_o_lights
    transition: 45
#...

And then controlling only light.there can result in, for example, the entire group turning on by AL. It got even weirder when I moved some lights from Zigbee groups to HASS light groups, where lights that were part of the Zigbee group would 'spontaneously' turn on when the HASS light group was controlled by AL.
All the weirdness I got was resolved when I made sure that all disbanded Zigbee groups were indeed "empty" by re-pairing the involved lights and making sure I was not controlling/addressing lights in a group individually, anywhere in my configuration.

Groetjes,

@Mariuss811
Copy link

So I control them by using the light.turn_on command on my z2m group light.wohnzimmer.
light.wohnzimmer contains:
light.deckenlampe_wohnzimmer light.schreibtisch light.fenster light.stehlampe_1 light.stehlampe_2 and light.stehlampe_3

And I can also confirm the wierd behavior by adding the whole group light.wohnzimmer instead of every single light.
That's why I put each one in the AL configuration. Which worked pretty well for a long time.
I don't use any Hue, nor Hass scenes.

Next thing i tried is to reset the configuration of my AL Living Room with:
action: adaptive_lighting.change_switch_settings data: use_defaults: factory entity_id: switch.adaptive_lighting_wohnzimmer

Which didn't change my AL configuration I made via the UI as far as I can say, but at least the light won't go to sleep brightness with the second light.turn_on call.

@djurny
Copy link

djurny commented Dec 16, 2024

Hi @Mariuss811,
Can you share your AL config? Preferrably the YAML, but if you enable include_config_in_attributes you should be able to also see the config in HASS.

On the Developer tools => States tab, select the switch.adaptive_lighting_xxx for your AL instance, not the switch.adaptive_lighting_adapt_brightness_xxx nor the switch.adaptive_lighting_adapt_color_xxx.

Re-reading the thread it might be transition_until_sleep is enabled (the 45 sec transition seems like it could be a sleep_transition)?

Also, what type of bulbs are these? All the same brand/type? And just in case they are (all) Zigbee, would be interesting to see the Zigbee dump as well, so see what's happening there.

Groetjes,

@Mariuss811
Copy link

Hey @djurny

They are all the same Brand (Hue) but not the same model. But as far as I can tell, they are all up to date via OTA updates.

What do you exactly mean with the Zigbee dump? Like the complete log of z2m at that moment?

Here is my configuration in AL:

icon: mdi:theme-light-dark
friendly_name: "Adaptive Lighting: Wohnzimmer"
configuration:
  lights:
    - light.deckenlampe_wohnzimmer
    - light.fenster
    - light.schreibtisch
    - light.stehlampe_1
    - light.stehlampe_2
    - light.stehlampe_3
  interval: 90
  transition: 45
  initial_transition: 1
  min_brightness: 45
  max_brightness: 85
  min_color_temp: 2000
  max_color_temp: 4000
  prefer_rgb_color: false
  sleep_brightness: 20
  sleep_rgb_or_color_temp: color_temp
  sleep_color_temp: 1000
  sleep_rgb_color:
    - 255
    - 56
    - 0
  sleep_transition: 3
  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: true
  autoreset_control_seconds: 0
  only_once: false
  adapt_only_on_bare_turn_on: false
  separate_turn_on_commands: false
  send_split_delay: 10
  adapt_delay: 0
  skip_redundant_commands: false
  intercept: true
  multi_light_intercept: false
  include_config_in_attributes: true
  name: Wohnzimmer
manual_control: []
brightness_pct: 45.02048260113275
color_temp_kelvin: 2000
color_temp_mired: 500
rgb_color:
  - 255
  - 136.86832541739756
  - 13.904070298965905
xy_color:
  - 0.598
  - 0.383
hs_color:
  - 30.504
  - 93.333
sun_position: -0.9994879349716813
force_rgb_color: false
autoreset_time_remaining: {}

Greetings

@djurny
Copy link

djurny commented Dec 17, 2024

Hi @Mariuss811,
What was the result of using only the Zigbee group light.wohnzimmer in the lights of AL ?
As your AL instance is not looking/following light.wohnzimmer, any change made to the members of the ZB group is considered a manual change.
Can you share again how the dimming happens? e.g. You do a light.turn_on of light.wohnzimmer and all is fine ? Or do the lights start dimming to 1% immediately or only after a period of time after the light.turn_on ?

Edit: In case you do not care about doing changes to your lights individually, you could also disable detect_non_ha_changes and see what happens. HASS does not know that light.wohnzimmer contains all the others, so AL also does not know. This means AL will consider your lights are manually controlled (you have detect_non_ha_changes enabled) and be hands off. Still does not explain the 1% or 20% (sleep_)brightness though, but perhaps this is a step towards an understanding.

Edit: You might consider using adaptive_lighting.apply with turn_on_lights: true instead of a light.turn_on to turn on all the lights.

Thx,
Groetjes,

@thk-socal
Copy link

Are you running Z2m Development? I am seeing a 1% similar issue and wondering if this has to do with Z2M and the new 2.0.0 code.

@Mariuss811
Copy link

No, I am running the latest 1.42.0 version.

And in my case the light turn to sleep brightness, so not exactly 1%

@Mariuss811
Copy link

So i think it have something to do with the transition settings of light.turn_on

In this case i had a

  1. light.turn_off on light.wohnzimmer which is part of my z2m group light.wohnzimmer
  2. then turned it back on with light.turn_on
  3. then i called light.turn_on with transition of 1 second
  4. light.turn_off on light.wohnzimmer
  5. light.turn_on on light.wohnzimmer
  6. then again a light.turn_on with 1 second transition on light.wohnzimmer

So far as i understand every time i call a

action: light.turn_on
data:
  transition: 1
target:
  entity_id: light.wohnzimmer

with a transition it gets dimmed down to my configured sleep brightness of AL.
But in the past this was never an issue. But unfortunately i cant tell when it started.

Here is my z2m log of light.schreibtisch:
(Filtered for one entity)

Timestamp State Brightness Color Temperature Link Quality Other Changes
2024-12-17 11:56:02 ON 216 252 98 Color (h/s/x/y) slightly changed
2024-12-17 11:56:02 OFF 216 252 98 -
2024-12-17 11:56:05 OFF 216 252 98 -
2024-12-17 11:56:05 ON 216 251 98 Color temperature slightly decreased, Color (h/s/x/y) slightly changed
2024-12-17 11:56:06 ON 216 251 65 Link quality significantly decreased
2024-12-17 11:56:15 ON 51 251 65 Brightness significantly decreased
2024-12-17 11:56:32 ON 51 251 61 Link quality slightly decreased
2024-12-17 11:56:32 OFF 51 251 61 -
2024-12-17 11:56:37 OFF 51 251 61/65 Link quality slightly increased
2024-12-17 11:56:37 ON 216 251 65 Brightness significantly increased
2024-12-17 11:56:52 ON 51 251 65 Brightness significantly decreased (again)

And the logs of AL in the same moment:

2024-12-17 11:56:02.540   [adaptive_lighting.switch] Detected an 'light.turn_off('['light.schreibtisch']', transition=None)' event with context.id='01JFA45DZCW7MM3JD40SA79SZT'
2024-12-17 11:56:02.696   [adaptive_lighting.switch] Detected a 'light.schreibtisch' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 51, 'saturation': 51, 'x': 0.3822, 'y': 0.3778}, 'last_seen': '2024-12-17T11:56:02+01:00', 'linkquality': 98, 'power_on_behavior': 'on', 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:desk-lamp-on', 'friendly_name': 'Schreibtisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45DZCW7MM3JD40SA79SZT'
2024-12-17 11:56:02.700   [adaptive_lighting.switch] Detected an 'on' → 'off' event for 'light.schreibtisch' with context.id='01JFA45DZCW7MM3JD40SA79SZT'
2024-12-17 11:56:05.821   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.schreibtisch']')' event with context.id='01JFA45H5X5PDXDHC9Y4BRRBPS'
2024-12-17 11:56:05.821   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45H5X5PDXDHC9Y4BRRBPS', is_skipped_hash='False'
2024-12-17 11:56:05.821   [adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01JFA45H5X5PDXDHC9Y4BRRBPS): entity_id=['light.schreibtisch'], params=>', service_data='{'entity_id': ['light.schreibtisch'], 'params': {}}'
2024-12-17 11:56:05.822   [adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{'Adaptive Lighting: Wohnzimmer': ['light.schreibtisch']}', skipped='[]'
2024-12-17 11:56:05.822   [adaptive_lighting.switch] (3) _service_interceptor_turn_on_handler: intercepting entity_ids='['light.schreibtisch']'
2024-12-17 11:56:05.822   [adaptive_lighting.switch] Intercepted TURN_ON call with data {'params': {}, 'entity_id': ['light.schreibtisch']} (01JFA45H5X5PDXDHC9Y4BRRBPS)
2024-12-17 11:56:05.823   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.schreibtisch
2024-12-17 11:56:05.823   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.schreibtisch with service data {'entity_id': 'light.schreibtisch', 'transition': 1.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:05.824   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.schreibtisch, context_id=01JFA45H5Z:al:K5XW:dpt_:D5, sleep_time=1.01, force=False, max_length=1, which=both, initial_sleep=True)
2024-12-17 11:56:05.984   [adaptive_lighting.switch] Detected a 'light.schreibtisch' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:05+01:00', 'linkquality': 98, 'power_on_behavior': 'on', 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:desk-lamp-on', 'friendly_name': 'Schreibtisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45H5X5PDXDHC9Y4BRRBPS'
2024-12-17 11:56:05.984   [adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.schreibtisch' with context.id='01JFA45H5X5PDXDHC9Y4BRRBPS'
2024-12-17 11:56:05.984   [adaptive_lighting.switch] is_proactively_adapting_context='True', context_id='01JFA45H5X5PDXDHC9Y4BRRBPS'
2024-12-17 11:56:05.984   [adaptive_lighting.switch] Skipping responding to 'off' → 'on' event for 'light.schreibtisch' with context.id='01JFA45H5X5PDXDHC9Y4BRRBPS' because we are already proactively adapting
2024-12-17 11:56:06.773   [adaptive_lighting.switch] Wohnzimmer: '_update_attrs_and_maybe_adapt_lights' called with context.id='01JFA45J3N:al:K5XW:ntrv:D6' lights: 'None', transition: '45.0', force: 'False'
2024-12-17 11:56:06.776   [adaptive_lighting.switch] Wohnzimmer: filtered_lights: '['light.deckenlampe_wohnzimmer', 'light.fenster', 'light.schreibtisch', 'light.stehlampe_1', 'light.stehlampe_2', 'light.stehlampe_3']'
2024-12-17 11:56:06.776   [adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01JFA42SQ6:al:K5XW:trn_:D3'
2024-12-17 11:56:06.777   [adaptive_lighting.switch] Wohnzimmer: State attributes of 'light.deckenlampe_wohnzimmer' did not change ({'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6666, 'min_mireds': 150, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:54:36+01:00', 'linkquality': 87, 'power_on_behavior': None, 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:ceiling-light', 'friendly_name': 'Deckenlampe Wohnzimmer', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}) wrt 'last_service_data' ({'entity_id': 'light.deckenlampe_wohnzimmer', 'transition': 1.0, 'brightness': 217, 'color_temp_kelvin': 3965}) (context.id=01JFA45J3N:al:K5XW:ntrv:D6)
2024-12-17 11:56:06.777   [adaptive_lighting.switch] Wohnzimmer: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.deckenlampe_wohnzimmer' with transition 45.0 and context.id=01JFA45J3N:al:K5XW:ntrv:D6
2024-12-17 11:56:06.778   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.deckenlampe_wohnzimmer
2024-12-17 11:56:06.778   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.deckenlampe_wohnzimmer with service data {'entity_id': 'light.deckenlampe_wohnzimmer', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:06.778   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.deckenlampe_wohnzimmer, context_id=01JFA45J3N:al:K5XW:ntrv:D6, sleep_time=45.01, force=False, max_length=1, which=both, initial_sleep=False)
2024-12-17 11:56:06.778   [adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01JFA42SQ6:al:K5XW:trn_:D3'
2024-12-17 11:56:06.783   [adaptive_lighting.switch] Wohnzimmer: State attributes of 'light.fenster' did not change ({'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 51, 'saturation': 51, 'x': 0.3822, 'y': 0.3778}, 'last_seen': '2024-12-17T11:54:36+01:00', 'linkquality': 65, 'power_on_behavior': 'on', 'update': {'installed_version': 16787714, 'latest_version': 16787714, 'state': 'idle'}, 'update_available': False, 'icon': 'hue:floor-spot', 'friendly_name': 'Fenster', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}) wrt 'last_service_data' ({'entity_id': 'light.fenster', 'transition': 1.0, 'brightness': 217, 'color_temp_kelvin': 3965}) (context.id=01JFA45J3N:al:K5XW:ntrv:D6)
2024-12-17 11:56:06.783   [adaptive_lighting.switch] Wohnzimmer: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.fenster' with transition 45.0 and context.id=01JFA45J3N:al:K5XW:ntrv:D6
2024-12-17 11:56:06.785   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.fenster
2024-12-17 11:56:06.785   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.fenster with service data {'entity_id': 'light.fenster', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:06.785   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.fenster, context_id=01JFA45J3N:al:K5XW:ntrv:D6, sleep_time=45.01, force=False, max_length=1, which=both, initial_sleep=False)
2024-12-17 11:56:06.785   [adaptive_lighting.switch] is_proactively_adapting_context='True', context_id='01JFA45H5X5PDXDHC9Y4BRRBPS'
2024-12-17 11:56:06.785   [adaptive_lighting.switch] Wohnzimmer: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.schreibtisch' with transition 45.0 and context.id=01JFA45J3N:al:K5XW:ntrv:D6
2024-12-17 11:56:06.786   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.schreibtisch
2024-12-17 11:56:06.786   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.schreibtisch with service data {'entity_id': 'light.schreibtisch', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:06.786   [adaptive_lighting.switch] Cancelled ongoing brightness adaptation calls (<Task pending name='Task-178416' coro=<AdaptiveSwitch._execute_adaptation_calls() running at /config/custom_components/adaptive_lighting/switch.py:1295> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[Task.task_wakeup()]>) for 'light.schreibtisch'
2024-12-17 11:56:06.787   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.schreibtisch, context_id=01JFA45J3N:al:K5XW:ntrv:D6, sleep_time=45.01, force=False, max_length=1, which=both, initial_sleep=False)
2024-12-17 11:56:06.787   [adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01JFA42SQ6:al:K5XW:trn_:D3'
2024-12-17 11:56:06.787   [adaptive_lighting.switch] Wohnzimmer: State attributes of 'light.stehlampe_1' did not change ({'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:54:36+01:00', 'linkquality': 61, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_1', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}) wrt 'last_service_data' ({'entity_id': 'light.stehlampe_1', 'transition': 1.0, 'brightness': 217, 'color_temp_kelvin': 3965}) (context.id=01JFA45J3N:al:K5XW:ntrv:D6)
2024-12-17 11:56:06.787   [adaptive_lighting.switch] Wohnzimmer: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.stehlampe_1' with transition 45.0 and context.id=01JFA45J3N:al:K5XW:ntrv:D6
2024-12-17 11:56:06.788   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.stehlampe_1
2024-12-17 11:56:06.789   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.stehlampe_1 with service data {'entity_id': 'light.stehlampe_1', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:06.789   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.stehlampe_1, context_id=01JFA45J3N:al:K5XW:ntrv:D6, sleep_time=45.01, force=False, max_length=1, which=both, initial_sleep=False)
2024-12-17 11:56:06.789   [adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01JFA42SQ6:al:K5XW:trn_:D3'
2024-12-17 11:56:06.790   [adaptive_lighting.switch] Wohnzimmer: State attributes of 'light.stehlampe_2' did not change ({'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:54:36+01:00', 'linkquality': 91, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_2', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}) wrt 'last_service_data' ({'entity_id': 'light.stehlampe_2', 'transition': 1.0, 'brightness': 217, 'color_temp_kelvin': 3965}) (context.id=01JFA45J3N:al:K5XW:ntrv:D6)
2024-12-17 11:56:06.790   [adaptive_lighting.switch] Wohnzimmer: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.stehlampe_2' with transition 45.0 and context.id=01JFA45J3N:al:K5XW:ntrv:D6
2024-12-17 11:56:06.791   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.stehlampe_2
2024-12-17 11:56:06.791   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.stehlampe_2 with service data {'entity_id': 'light.stehlampe_2', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:06.791   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.stehlampe_2, context_id=01JFA45J3N:al:K5XW:ntrv:D6, sleep_time=45.01, force=False, max_length=1, which=both, initial_sleep=False)
2024-12-17 11:56:06.791   [adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01JFA42SQ6:al:K5XW:trn_:D3'
2024-12-17 11:56:06.792   [adaptive_lighting.switch] Wohnzimmer: State attributes of 'light.stehlampe_3' did not change ({'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 4000, 'min_mireds': 250, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect', 'colorloop', 'stop_colorloop'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 51, 'saturation': 51, 'x': 0.3822, 'y': 0.3778}, 'color_options': {'execute_if_off': True}, 'last_seen': '2024-12-17T11:54:36+01:00', 'level_config': {'execute_if_off': True}, 'linkquality': 87, 'power_on_behavior': 'on', 'update': {'installed_version': 16777272, 'latest_version': 16777272, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_3', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}) wrt 'last_service_data' ({'entity_id': 'light.stehlampe_3', 'transition': 1.0, 'brightness': 217, 'color_temp_kelvin': 3965}) (context.id=01JFA45J3N:al:K5XW:ntrv:D6)
2024-12-17 11:56:06.792   [adaptive_lighting.switch] Wohnzimmer: Calling _adapt_light from _update_attrs_and_maybe_adapt_lights: 'light.stehlampe_3' with transition 45.0 and context.id=01JFA45J3N:al:K5XW:ntrv:D6
2024-12-17 11:56:06.793   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.stehlampe_3
2024-12-17 11:56:06.793   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.stehlampe_3 with service data {'entity_id': 'light.stehlampe_3', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:06.793   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.stehlampe_3, context_id=01JFA45J3N:al:K5XW:ntrv:D6, sleep_time=45.01, force=False, max_length=1, which=both, initial_sleep=False)
2024-12-17 11:56:06.794   [adaptive_lighting.switch] Wohnzimmer: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.deckenlampe_wohnzimmer', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970} with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.794   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.deckenlampe_wohnzimmer']')' event with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.794   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45J3N:al:K5XW:ntrv:D6', is_skipped_hash='False'
2024-12-17 11:56:06.795   [adaptive_lighting.switch] Wohnzimmer: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.fenster', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970} with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.795   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.fenster']')' event with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.795   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45J3N:al:K5XW:ntrv:D6', is_skipped_hash='False'
2024-12-17 11:56:06.796   [adaptive_lighting.switch] Wohnzimmer: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.schreibtisch', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970} with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.796   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.schreibtisch']')' event with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.796   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45J3N:al:K5XW:ntrv:D6', is_skipped_hash='False'
2024-12-17 11:56:06.797   [adaptive_lighting.switch] Wohnzimmer: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.stehlampe_1', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970} with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.797   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.stehlampe_1']')' event with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.797   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45J3N:al:K5XW:ntrv:D6', is_skipped_hash='False'
2024-12-17 11:56:06.797   [adaptive_lighting.switch] Wohnzimmer: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.stehlampe_2', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970} with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.798   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.stehlampe_2']')' event with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.798   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45J3N:al:K5XW:ntrv:D6', is_skipped_hash='False'
2024-12-17 11:56:06.798   [adaptive_lighting.switch] Wohnzimmer: Scheduling 'light.turn_on' with the following 'service_data': {'entity_id': 'light.stehlampe_3', 'transition': 45.0, 'brightness': 217, 'color_temp_kelvin': 3970} with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.799   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.stehlampe_3']')' event with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.799   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45J3N:al:K5XW:ntrv:D6', is_skipped_hash='False'
2024-12-17 11:56:06.799   [adaptive_lighting.switch] Wohnzimmer: Ongoing adaptation of light.schreibtisch cancelled, with AdaptationData: AdaptationData(entity_id=light.schreibtisch, context_id=01JFA45H5Z:al:K5XW:dpt_:D5, sleep_time=1.01, force=False, max_length=1, which=both, initial_sleep=True)
2024-12-17 11:56:06.924   [adaptive_lighting.switch] Detected a 'light.fenster' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 51, 'saturation': 51, 'x': 0.3822, 'y': 0.3778}, 'last_seen': '2024-12-17T11:56:06+01:00', 'linkquality': 43, 'power_on_behavior': 'on', 'update': {'installed_version': 16787714, 'latest_version': 16787714, 'state': 'idle'}, 'update_available': False, 'icon': 'hue:floor-spot', 'friendly_name': 'Fenster', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.924   [adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.fenster=on; min_color_temp_kelvin=2000, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=500, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], supported_color_modes=['color_temp', 'xy'], effect=None, color_mode=color_temp, brightness=217, color_temp_kelvin=3968, color_temp=252, hs_color=(26.827, 35.453), rgb_color=(255, 205, 165), xy_color=(0.421, 0.365), color=h=40, hue=40, s=51, saturation=51, x=0.3822, y=0.3778, last_seen=2024-12-17T11:56:06+01:00, linkquality=43, power_on_behavior=on, update=installed_version=16787714, latest_version=16787714, state=idle, update_available=False, icon=hue:floor-spot, friendly_name=Fenster, supported_features=44 @ 2024-12-17T10:34:06.968399+01:00>' found for light.fenster
2024-12-17 11:56:06.925   [adaptive_lighting.switch] Start transition timer of 45.0 seconds for light light.fenster
2024-12-17 11:56:06.958   [adaptive_lighting.switch] Detected a 'light.deckenlampe_wohnzimmer' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6666, 'min_mireds': 150, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:06+01:00', 'linkquality': 98, 'power_on_behavior': None, 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:ceiling-light', 'friendly_name': 'Deckenlampe Wohnzimmer', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.958   [adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.deckenlampe_wohnzimmer=on; min_color_temp_kelvin=2000, max_color_temp_kelvin=6666, min_mireds=150, max_mireds=500, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], supported_color_modes=['color_temp'], effect=None, color_mode=color_temp, brightness=217, color_temp_kelvin=3968, color_temp=252, hs_color=(26.827, 35.453), rgb_color=(255, 205, 165), xy_color=(0.421, 0.365), last_seen=2024-12-17T11:56:06+01:00, linkquality=98, power_on_behavior=None, update=installed_version=16786688, latest_version=16786688, state=idle, update_available=False, icon=mdi:ceiling-light, friendly_name=Deckenlampe Wohnzimmer, supported_features=44 @ 2024-12-17T11:21:43.696599+01:00>' found for light.deckenlampe_wohnzimmer
2024-12-17 11:56:06.958   [adaptive_lighting.switch] Start transition timer of 45.0 seconds for light light.deckenlampe_wohnzimmer
2024-12-17 11:56:06.969   [adaptive_lighting.switch] Detected a 'light.stehlampe_2' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:06+01:00', 'linkquality': 98, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_2', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.969   [adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.stehlampe_2=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=454, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], supported_color_modes=['color_temp'], effect=None, color_mode=color_temp, brightness=217, color_temp_kelvin=3968, color_temp=252, hs_color=(26.827, 35.453), rgb_color=(255, 205, 165), xy_color=(0.421, 0.365), last_seen=2024-12-17T11:56:06+01:00, linkquality=98, power_on_behavior=None, update=installed_version=16786690, latest_version=16786690, state=idle, update_available=False, friendly_name=Stehlampe_2, supported_features=44 @ 2024-12-17T10:34:06.967798+01:00>' found for light.stehlampe_2
2024-12-17 11:56:06.969   [adaptive_lighting.switch] Start transition timer of 45.0 seconds for light light.stehlampe_2
2024-12-17 11:56:06.981   [adaptive_lighting.switch] Detected a 'light.fenster' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 51, 'saturation': 51, 'x': 0.3822, 'y': 0.3778}, 'last_seen': '2024-12-17T11:56:06+01:00', 'linkquality': 76, 'power_on_behavior': 'on', 'update': {'installed_version': 16787714, 'latest_version': 16787714, 'state': 'idle'}, 'update_available': False, 'icon': 'hue:floor-spot', 'friendly_name': 'Fenster', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:06.981   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.fenster' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.031   [adaptive_lighting.switch] Detected a 'light.schreibtisch' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 65, 'power_on_behavior': 'on', 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:desk-lamp-on', 'friendly_name': 'Schreibtisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.031   [adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.schreibtisch=on; min_color_temp_kelvin=2000, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=500, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], supported_color_modes=['color_temp', 'xy'], effect=None, color_mode=color_temp, brightness=217, color_temp_kelvin=3984, color_temp=251, hs_color=(26.819, 35.161), rgb_color=(255, 205, 165), xy_color=(0.421, 0.365), color=h=40, hue=40, s=50, saturation=50, x=0.3813, y=0.3773, last_seen=2024-12-17T11:56:07+01:00, linkquality=65, power_on_behavior=on, update=installed_version=16786688, latest_version=16786688, state=idle, update_available=False, icon=mdi:desk-lamp-on, friendly_name=Schreibtisch, supported_features=44 @ 2024-12-17T11:56:05.984357+01:00>' found for light.schreibtisch
2024-12-17 11:56:07.032   [adaptive_lighting.switch] Start transition timer of 45.0 seconds for light light.schreibtisch
2024-12-17 11:56:07.046   [adaptive_lighting.switch] Detected a 'light.stehlampe_1' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 69, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_1', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.046   [adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.stehlampe_1=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=454, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], supported_color_modes=['color_temp'], effect=None, color_mode=color_temp, brightness=217, color_temp_kelvin=3968, color_temp=252, hs_color=(26.827, 35.453), rgb_color=(255, 205, 165), xy_color=(0.421, 0.365), last_seen=2024-12-17T11:56:07+01:00, linkquality=69, power_on_behavior=None, update=installed_version=16786690, latest_version=16786690, state=idle, update_available=False, friendly_name=Stehlampe_1, supported_features=44 @ 2024-12-17T10:34:06.867196+01:00>' found for light.stehlampe_1
2024-12-17 11:56:07.046   [adaptive_lighting.switch] Start transition timer of 45.0 seconds for light light.stehlampe_1
2024-12-17 11:56:07.051   [adaptive_lighting.switch] Detected a 'light.fenster' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:06+01:00', 'linkquality': 76, 'power_on_behavior': 'on', 'update': {'installed_version': 16787714, 'latest_version': 16787714, 'state': 'idle'}, 'update_available': False, 'icon': 'hue:floor-spot', 'friendly_name': 'Fenster', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.051   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.fenster' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.087   [adaptive_lighting.switch] Detected a 'light.stehlampe_2' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 98, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_2', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.087   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.stehlampe_2' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.093   [adaptive_lighting.switch] Detected a 'light.stehlampe_3' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 4000, 'min_mireds': 250, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect', 'colorloop', 'stop_colorloop'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 51, 'saturation': 51, 'x': 0.3822, 'y': 0.3778}, 'color_options': {'execute_if_off': True}, 'last_seen': '2024-12-17T11:56:07+01:00', 'level_config': {'execute_if_off': True}, 'linkquality': 72, 'power_on_behavior': 'on', 'update': {'installed_version': 16777272, 'latest_version': 16777272, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_3', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.093   [adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.stehlampe_3=on; min_color_temp_kelvin=2202, max_color_temp_kelvin=4000, min_mireds=250, max_mireds=454, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect', 'colorloop', 'stop_colorloop'], supported_color_modes=['color_temp', 'xy'], effect=None, color_mode=color_temp, brightness=217, color_temp_kelvin=3968, color_temp=252, hs_color=(26.827, 35.453), rgb_color=(255, 205, 165), xy_color=(0.421, 0.365), color=h=40, hue=40, s=51, saturation=51, x=0.3822, y=0.3778, color_options=execute_if_off=True, last_seen=2024-12-17T11:56:07+01:00, level_config=execute_if_off=True, linkquality=72, power_on_behavior=on, update=installed_version=16777272, latest_version=16777272, state=idle, update_available=False, friendly_name=Stehlampe_3, supported_features=44 @ 2024-12-17T10:34:06.952712+01:00>' found for light.stehlampe_3
2024-12-17 11:56:07.093   [adaptive_lighting.switch] Start transition timer of 45.0 seconds for light light.stehlampe_3
2024-12-17 11:56:07.102   [adaptive_lighting.switch] Detected a 'light.stehlampe_2' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 98, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_2', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.103   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.stehlampe_2' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.110   [adaptive_lighting.switch] Detected a 'light.deckenlampe_wohnzimmer' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6666, 'min_mireds': 150, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 61, 'power_on_behavior': None, 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:ceiling-light', 'friendly_name': 'Deckenlampe Wohnzimmer', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.111   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.deckenlampe_wohnzimmer' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.113   [adaptive_lighting.switch] Detected a 'light.deckenlampe_wohnzimmer' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6666, 'min_mireds': 150, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 61, 'power_on_behavior': None, 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:ceiling-light', 'friendly_name': 'Deckenlampe Wohnzimmer', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.113   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.deckenlampe_wohnzimmer' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.148   [adaptive_lighting.switch] Detected a 'light.stehlampe_3' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 4000, 'min_mireds': 250, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect', 'colorloop', 'stop_colorloop'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 51, 'saturation': 51, 'x': 0.3822, 'y': 0.3778}, 'color_options': {'execute_if_off': True}, 'last_seen': '2024-12-17T11:56:07+01:00', 'level_config': {'execute_if_off': True}, 'linkquality': 58, 'power_on_behavior': 'on', 'update': {'installed_version': 16777272, 'latest_version': 16777272, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_3', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.148   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.stehlampe_3' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.151   [adaptive_lighting.switch] Detected a 'light.stehlampe_3' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 4000, 'min_mireds': 250, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect', 'colorloop', 'stop_colorloop'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'color_options': {'execute_if_off': True}, 'last_seen': '2024-12-17T11:56:07+01:00', 'level_config': {'execute_if_off': True}, 'linkquality': 58, 'power_on_behavior': 'on', 'update': {'installed_version': 16777272, 'latest_version': 16777272, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_3', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.152   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.stehlampe_3' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.233   [adaptive_lighting.switch] Detected a 'light.stehlampe_1' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3968, 'color_temp': 252, 'hs_color': (26.827, 35.453), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 65, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_1', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.233   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.stehlampe_1' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:07.241   [adaptive_lighting.switch] Detected a 'light.stehlampe_1' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 65, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_1', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45J3N:al:K5XW:ntrv:D6'
2024-12-17 11:56:07.241   [adaptive_lighting.switch] AdaptiveLightingManager: State change event of 'light.stehlampe_1' is already in 'self.our_last_state_on_change' (01JFA45J3N:al:K5XW:ntrv:D6) adding this state also
2024-12-17 11:56:15.540   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA45TNK0V5H304EAYXDEGPM', is_skipped_hash='False'
2024-12-17 11:56:15.540   [adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01JFA45TNK0V5H304EAYXDEGPM): entity_id=['light.wohnzimmer'], params=transition=1.0>', service_data='{'entity_id': ['light.wohnzimmer'], 'params': {'transition': 1.0}}'
2024-12-17 11:56:15.541   [adaptive_lighting.switch] No switch found for entity_id='light.wohnzimmer', skipped='['light.wohnzimmer']'
2024-12-17 11:56:15.541   [adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.wohnzimmer']'
2024-12-17 11:56:15.799   [adaptive_lighting.switch] Detected a 'light.fenster' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:06+01:00', 'linkquality': 76, 'power_on_behavior': 'on', 'update': {'installed_version': 16787714, 'latest_version': 16787714, 'state': 'idle'}, 'update_available': False, 'icon': 'hue:floor-spot', 'friendly_name': 'Fenster', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45TXQDNBPDRVBZBT89RRD'
2024-12-17 11:56:15.809   [adaptive_lighting.switch] Detected a 'light.stehlampe_2' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 98, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_2', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45TY1E01R7PB9AQ1S74Y5'
2024-12-17 11:56:15.814   [adaptive_lighting.switch] Detected a 'light.stehlampe_1' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 65, 'power_on_behavior': None, 'update': {'installed_version': 16786690, 'latest_version': 16786690, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_1', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45TY6TCG5XDGJBH3AM58P'
2024-12-17 11:56:15.817   [adaptive_lighting.switch] Detected a 'light.schreibtisch' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 65, 'power_on_behavior': 'on', 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:desk-lamp-on', 'friendly_name': 'Schreibtisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45TY97BVJC0YZ2MH988Y5'
2024-12-17 11:56:15.819   [adaptive_lighting.switch] Detected a 'light.deckenlampe_wohnzimmer' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6666, 'min_mireds': 150, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'last_seen': '2024-12-17T11:56:07+01:00', 'linkquality': 61, 'power_on_behavior': None, 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:ceiling-light', 'friendly_name': 'Deckenlampe Wohnzimmer', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45TYB4WY5CHKMCHQMG15G'
2024-12-17 11:56:15.824   [adaptive_lighting.switch] Detected a 'light.stehlampe_3' 'state_changed' event: '{'min_color_temp_kelvin': 2202, 'max_color_temp_kelvin': 4000, 'min_mireds': 250, 'max_mireds': 454, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect', 'colorloop', 'stop_colorloop'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'color_options': {'execute_if_off': True}, 'last_seen': '2024-12-17T11:56:07+01:00', 'level_config': {'execute_if_off': True}, 'linkquality': 58, 'power_on_behavior': 'on', 'update': {'installed_version': 16777272, 'latest_version': 16777272, 'state': 'idle'}, 'update_available': False, 'friendly_name': 'Stehlampe_3', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA45TYGYPE8P418PQB5CXH9'
2024-12-17 11:56:18.040   [adaptive_lighting.switch] Schlafzimmer: '_update_attrs_and_maybe_adapt_lights' called with context.id='01JFA45X3R:al:KNRW:ntrv:CX' lights: 'None', transition: '45.0', force: 'False'
2024-12-17 11:56:32.663   [adaptive_lighting.switch] Detected an 'light.turn_off('['light.schreibtisch']', transition=None)' event with context.id='01JFA46BCPWYS26DC1QDBH7WYJ'
2024-12-17 11:56:32.729   [adaptive_lighting.switch] Detected a 'light.schreibtisch' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:32+01:00', 'linkquality': 61, 'power_on_behavior': 'on', 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:desk-lamp-on', 'friendly_name': 'Schreibtisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA46BCPWYS26DC1QDBH7WYJ'
2024-12-17 11:56:32.733   [adaptive_lighting.switch] Detected an 'on' → 'off' event for 'light.schreibtisch' with context.id='01JFA46BCPWYS26DC1QDBH7WYJ'
2024-12-17 11:56:37.275   [adaptive_lighting.switch] Detected an 'light.turn_on('['light.schreibtisch']')' event with context.id='01JFA46FWVV5C6PXTPJCAT9J51'
2024-12-17 11:56:37.275   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA46FWVV5C6PXTPJCAT9J51', is_skipped_hash='False'
2024-12-17 11:56:37.275   [adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01JFA46FWVV5C6PXTPJCAT9J51): entity_id=['light.schreibtisch'], params=>', service_data='{'entity_id': ['light.schreibtisch'], 'params': {}}'
2024-12-17 11:56:37.276   [adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{'Adaptive Lighting: Wohnzimmer': ['light.schreibtisch']}', skipped='[]'
2024-12-17 11:56:37.276   [adaptive_lighting.switch] (3) _service_interceptor_turn_on_handler: intercepting entity_ids='['light.schreibtisch']'
2024-12-17 11:56:37.276   [adaptive_lighting.switch] Intercepted TURN_ON call with data {'params': {}, 'entity_id': ['light.schreibtisch']} (01JFA46FWVV5C6PXTPJCAT9J51)
2024-12-17 11:56:37.277   [adaptive_lighting.switch] Wohnzimmer: Setting color_temp of light light.schreibtisch
2024-12-17 11:56:37.277   [adaptive_lighting.adaptation_utils] Preparing adaptation data for light.schreibtisch with service data {'entity_id': 'light.schreibtisch', 'transition': 1.0, 'brightness': 217, 'color_temp_kelvin': 3970}
2024-12-17 11:56:37.281   [adaptive_lighting.switch] Wohnzimmer: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.schreibtisch, context_id=01JFA46FWX:al:K5XW:dpt_:D7, sleep_time=1.01, force=False, max_length=1, which=both, initial_sleep=True)
2024-12-17 11:56:37.420   [adaptive_lighting.switch] Detected a 'light.schreibtisch' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 217, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:37+01:00', 'linkquality': 65, 'power_on_behavior': 'on', 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:desk-lamp-on', 'friendly_name': 'Schreibtisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA46FWVV5C6PXTPJCAT9J51'
2024-12-17 11:56:37.421   [adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.schreibtisch' with context.id='01JFA46FWVV5C6PXTPJCAT9J51'
2024-12-17 11:56:37.421   [adaptive_lighting.switch] is_proactively_adapting_context='True', context_id='01JFA46FWVV5C6PXTPJCAT9J51'
2024-12-17 11:56:37.421   [adaptive_lighting.switch] Skipping responding to 'off' → 'on' event for 'light.schreibtisch' with context.id='01JFA46FWVV5C6PXTPJCAT9J51' because we are already proactively adapting
2024-12-17 11:56:51.929   [adaptive_lighting.switch] Transition finished for light light.fenster
2024-12-17 11:56:51.961   [adaptive_lighting.switch] Transition finished for light light.deckenlampe_wohnzimmer
2024-12-17 11:56:51.972   [adaptive_lighting.switch] Transition finished for light light.stehlampe_2
2024-12-17 11:56:51.977   [adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01JFA46Y88HN9TPDTDA2X0MB0T', is_skipped_hash='False'
2024-12-17 11:56:51.977   [adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01JFA46Y88HN9TPDTDA2X0MB0T): entity_id=['light.wohnzimmer'], params=transition=1.0>', service_data='{'entity_id': ['light.wohnzimmer'], 'params': {'transition': 1.0}}'
2024-12-17 11:56:51.978   [adaptive_lighting.switch] No switch found for entity_id='light.wohnzimmer', skipped='['light.wohnzimmer']'
2024-12-17 11:56:51.978   [adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.wohnzimmer']'
2024-12-17 11:56:52.038   [adaptive_lighting.switch] Transition finished for light light.schreibtisch
2024-12-17 11:56:52.052   [adaptive_lighting.switch] Transition finished for light light.stehlampe_1
2024-12-17 11:56:52.097   [adaptive_lighting.switch] Transition finished for light light.stehlampe_3
2024-12-17 11:56:52.258   [adaptive_lighting.switch] Detected a 'light.schreibtisch' 'state_changed' event: '{'min_color_temp_kelvin': 2000, 'max_color_temp_kelvin': 6535, 'min_mireds': 153, 'max_mireds': 500, 'effect_list': ['blink', 'breathe', 'okay', 'channel_change', 'candle', 'fireplace', 'colorloop', 'finish_effect', 'stop_effect', 'stop_hue_effect'], 'supported_color_modes': ['color_temp', 'xy'], 'effect': None, 'color_mode': <ColorMode.COLOR_TEMP: 'color_temp'>, 'brightness': 51, 'color_temp_kelvin': 3984, 'color_temp': 251, 'hs_color': (26.819, 35.161), 'rgb_color': (255, 205, 165), 'xy_color': (0.421, 0.365), 'color': {'h': 40, 'hue': 40, 's': 50, 'saturation': 50, 'x': 0.3813, 'y': 0.3773}, 'last_seen': '2024-12-17T11:56:37+01:00', 'linkquality': 65, 'power_on_behavior': 'on', 'update': {'installed_version': 16786688, 'latest_version': 16786688, 'state': 'idle'}, 'update_available': False, 'icon': 'mdi:desk-lamp-on', 'friendly_name': 'Schreibtisch', 'supported_features': <LightEntityFeature.EFFECT|FLASH|TRANSITION: 44>}' with context.id='01JFA46YH243T6EDRXCA6Z2C1F'

@thk-socal
Copy link

I have a similar issue and confirmed now. If AL is enabled, then if I turn off PHYSICALLY AT THE SWITCH, the lights will go off, but HA will start to show the lights dimming, but it never marks them as off. Then HA will set the dim percentage back to the AL setting even though the lights are off in the zigbee group. The lights do not go back on because it was at the previous setting and I have marked only to send if the settings are different. If you turn off AL, then all the changes flow back and forth correctly.

It is like the AL is ignoring the light turn off command and just reseting back to the original settings.

@thk-socal
Copy link

thk-socal commented Dec 18, 2024

Digging in farther, I believe the following section of code, in 'switch.py' is where the manual control gets reset. I believe that this might be getting reset before the light finishes turning off/dimming and AL then gets kicked back on. Perhaps the section needs a delay, equal to the transition time of the off command, before the reset is issued?

  def off(eid: str, event: Event):
    self.turn_off_event[eid] = event
    self.reset(eid)

@thk-socal
Copy link

Perhaps something like this might fix it?

import asyncio

if service == SERVICE_TURN_OFF:
    transition = service_data.get(ATTR_TRANSITION, 3)  # Default to 3 seconds if no transition is provided
    _LOGGER.debug(
        "Detected a 'light.turn_off('%s', transition=%s)' event with context.id='%s'",
        entity_ids,
        transition,
        event.context.id,
    )
    for eid in entity_ids:
        self.turn_off_event[eid] = event

        # Add a delay before calling self.reset(eid)
        asyncio.create_task(self._delayed_reset(eid, transition))

# Add a new helper method for delayed reset
async def _delayed_reset(self, eid, delay):
    """Delay the reset call by the specified time."""
    _LOGGER.debug("Waiting for %s seconds before resetting %s", delay, eid)
    await asyncio.sleep(delay)  # Wait for the delay
    _LOGGER.debug("Resetting %s after %s seconds delay", eid, delay)
    self.reset(eid)

@thk-socal
Copy link

thk-socal commented Dec 18, 2024

Been going crazy trying to figure this out. What it appears is that Z2M is not writing the last state of the group to MQTT for HA/AL to see. So I am trying the following settings for my groups, in group.yaml for Z2M:

image

The last member state seems to be the thing that has fixed this for me and now my switch on/off or HA on/off or HomeKit on/off commands all sync and I am getting proper status for them all.

@Mariuss811
Copy link

@djurny

Edit: You might consider using adaptive_lighting.apply with turn_on_lights: true instead of a light.turn_on to turn on all the lights.

I think this could work, but something changed. I mean, I'm using AL like 2 years and never had this issue before.
If there is no easy fix, I will change it. But not having to worry how you turn on your lights would be great.

@thk-socal
So you are using Hass grouping instead of z2m grouping, or am I wrong?

@thk-socal
Copy link

@Mariuss811 z2m grouping. Once I made those changes in my groups for z2m, all my issues went away. The status of my groups was not always getting set to OFF for Hass/AL, but the changes made sure it was picked up correctly. I run a separate groups.yaml file for z2m, instead of all of it in the configuration file.

@djurny
Copy link

djurny commented Dec 18, 2024

Also wondering what would happen if you dissolve the Zigbee grouping and use a HASS group for the light.turn_on of the wohnzimmer lights?
Groetjes,

@thk-socal
Copy link

Also wondering what would happen if you dissolve the Zigbee grouping and use a HASS group for the light.turn_on of the wohnzimmer lights? Groetjes,

I am not a fan of getting rid of Z2M groupings. The groups allow for the lights to function if HASS is down for any reason, and a requirement from my wife is that they work even if the automation is broken. Also my switches have LEDs on them to indicate on/off and current level of the lights. Running commands at the group keeps all of the levels correct. One additional issue when using HASS groups, you can get popcorning of the lights as they do not get the command at the same time.

So I avoid HASS groups when ever possible.

@djurny
Copy link

djurny commented Dec 19, 2024

Hi @thk-socal,
Still, I'm interested in what happens if:

  • AL's lights list would use a HASS group with all wohnzimmer members, the Zigbee group light.wohnzimmer dissolved (all members removed/re-paired).
  • AL's lights list would use just the Zigbee group light.wohnzimmer

Somehow this issue seems linked with a difference in behavior on how the HASS group works compared to a Zigbee group and having AL not being aware of all members being changed or not getting the correct/latest update on the state of the members of the Zigbee group.

Agree on the popcorning thing, yeah, I must admit I also use them, but only per fixture - e.g. some ceiling lights have two or three bulbs so those I have grouped in a Zigbee group. I however will not have AL control the bulbs individually, but AL will control the Zigbee group (or HASS group containing one or more ZB groups or bulbs).

Edit: Just wondering why not use the light.turn_on to turn on all the members in one go? You do not have to have a group for that, just provide the list of lights (all the members). That way AL can intercept the light.turn_on and not switch to manual_control.

Groetjes,

@noconnor29
Copy link

noconnor29 commented Jan 4, 2025

I have the same issue on my Bedroom AL integration while two other rooms work as expected after setting up AL for the first time. I use z2m groups for all of my AL integrations. I tested deleting the z2m group and assigned individual bulbs to the Bedroom AL integration but there was no change and they still sit at 1% brightness.

The two bulbs in Bedroom are Phillips 9290012573A and I don't have any others of them in my house. I'll have to swap bulbs around and see if they're the underlying issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants