basnijholt / adaptive-lighting

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

Offer "proxy" light entity instead of attempting to intercept (at least for now) #947

Open Lx opened 3 months ago

Lx commented 3 months ago

Thank you for all of your efforts on the Adaptive Lighting integration.

The "intercept" feature is not working for me with the latest Home Assistant core. Lights come on at full brightness before Adaptive Lighting takes over.

I understand that currently, it's not possible to truly intercept the service call without some cheeky hacks.

Therefore, I would like to propose that Adaptive Lighting creates a "proxy" light entity that, when turned on, is always guaranteed to give Adaptive Lighting the opportunity to respond prior to any actual light.turn_on calls reaching the lights in question. This approach would also be more immune to Home Assistant updates, since it's an existing core-supported mechanism.

I understand that this could be emulated manually by end users through template lights, but creating a template light for each Adaptive Lighting instance is a lot of manual labour compared to (ideally) just ticking a box in each instance's configuration.

Thank you for your consideration of this proposal.