Circadian Lighting custom component for Home Assistant
Replaced deprecated "device_state_attributes" property with "extra_state_attributes", should have no changes to functionality.
This adds color temperature as an attribute to Circadian Lighting switch entities. This is useful because different Circadian Lighting switch configurations can set different color temperature values when in "sleep mode". This will also likely remove some confusion about creating templates and automations to set color temperature using CL calculated values.
Most of this work was contributed by @basnijholt - thanks also go to @KTibow @emansom @samnewman86 @rubdos
This updates manifest.json to include a version as required by HA Core 2021.5.x, and also includes some other changes to follow the latest developer documentation. This update also includes changes to allow the component to work with Astral v2 while remaining backwards compatible with v1.
Construct 'today' differently, should fix an issue with 2.0.2b at certain times.
Fix percentage calculation after code simplification.
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.