basnijholt / adaptive-lighting

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

Changed group members not adjusted by adaptive lighting #1001

Open Shadoxity opened 1 month ago

Shadoxity commented 1 month ago

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:

2 debug logs attached

  1. While the issue is happening
  2. after fixing the issue by changing the adaptive lighting setting to a different light and then back.
  1. Your Adaptive Lighting configuration:

Config is basic just changing the colour and brightness - not relevant to the issue. 

  1. (If using Zigbee2MQTT), provide your configuration files (remove all personal information before posting): NA Matter devices

  2. Describe the bug and how to reproduce it: When a light group has a member changed, adaptive lighting does not detect the change.

So the changed light does not get any adaptive lighting settings applied. It treats it like it is not part of the light group.

  1. Steps to reproduce the behavior:

Create a light group with multiple bulbs in it. Configure adaptive lighting and so it will make changes/intercept when they turn on. Change one of the light group members for another bulb that is not currently in the group (I.e. my scenario was replacing a few failed bulbs).

After that, HA will turn on/off the light group with the new bulb, but adaptive lighting does not modify the colour or brightness of the added bulb.

To fix it, you need to edit the adaptive lighting, pick a different light, submit it, edit again, pick the correct light again, then it updates all bulbs as expected

home-assistant_adaptive_lighting_Issue log.log home-assistant_adaptive_lighting_edit-and-fix.log

smoores-dev commented 4 weeks ago

I'm also experiencing this issue. @Shadoxity I don't know if this is happening to you as well, but even after following your workaround, AL doesn't actually adapt the new lights. It will sync them to the correct brightness/temp after I switch the group and then switch it back, but they don't get adapted over time along with the original lights!

Shadoxity commented 3 weeks ago

@smoores-dev I cannot comment on that as I have that disabled currently. It gives some of my nanoleaf bulbs a heart attack when its ok, so its currently just adjusting when turning on.

smoores-dev commented 3 weeks ago

Ah yeah, turns out this was actually a separate issue; I was targeting my lights' devices rather than entities with the light.turn_on service, so Adaptive Lighting wasn't intercepting it.