basnijholt / adaptive-lighting

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

Make sure that SimpleSwitches are added before AdaptiveSwitch #686

Closed basnijholt closed 1 year ago

basnijholt commented 1 year ago

This fixes the first issue that is brought up in https://github.com/basnijholt/adaptive-lighting/issues/682#issue-1827870636 by @bouwew.

@bouwew, your issue is solved in https://github.com/basnijholt/adaptive-lighting/pull/686.

This is a strange race condition which happens when initializing the AdaptiveSwitch is done before initializing the other switches (e.g., sleep, adapt_brightness, or adapt_color).

This condition has been present in all previous versions, however, for some reason it is more likely to occur now.