Open BenoitAnastay opened 5 months ago
@th3w1zard1 Hi, please have a look to this PR, you were interested into this implementation
Well that was quite a rabbit hole of information I had forgotten about.
I am not familiar with the async code you're using. Usually we use hassio's api as migrating to other async implementations have caused bugs in the past. I know next to nothing about that.
other than that your implementation looks good. You are creating yet another attr, ensuring existing functionality will persist, showing a clear understanding of our process.
@th3w1zard1 Thanks for the feedback, I'll now try to cleanup my PR, making tests pass.
I don't know how I can properly document this functionality to make it clear for everyone. I might also replace the keyword by a droplist of scenes light for lights entities, the configuration might take longer but it will help casual user to avoid error such as two overlaping keyword
For the main logic I know its robust, I use it since 2022 with another custom_integration (https://github.com/claytonjn/hass-circadian_lighting/pull/195)
Hum there is a bug values aren't updated with daylight, it's probably out of range values of hue bridge, I'll check that
I've added a delays of 5 minutes between same keyword update to avoid overloading the bridge. Maybe i'll need to add a delay between each API call as well
This PR will let you set a keyword to search in your scenes list and update the set brightness and colortemp without changing power state.
It is usefull when you use Hue Bridge and you set your buttons to a scene. It is not working with multiple bridge instance, it will only update the first bridge, this behaviour is easy to fix but I don't have a second bridge make tests
Usage exemple:
AL_living room celling light
,AL_living room table top light
,AL_living room all lights
with the lights you want to be turned on.AL_living room
as keyword and all living room scenes will be updateSolves #271