Async!
This release is entirely the work of @basnijholt - all credit goes to him for this wonderful contribution!
I have simplified and rewritten a lot of the code.
In addition, I have added the functionalities:
- add only_once option to switch, which makes the light change to the correct value only when turning it on (or disabled_state, sleeping_state switch). This is useful when you want to manually change the settings of the lights sometimes and make it stay.
- add ability to make sleep_state and disable_state lists of options. For example when using an input_select where something should be disabled on multiple states. This is a non-breaking change because it also accepts just a single string.
- The switch is now fully async, which means that when adjusting the lights, all lights get the service call simultaneously.