Fixes
Switches not loading after updating to Home Assistant 2026.10 (#278)
Switches with a sleep_entity or disable_entity could fail to load when Home Assistant started, with this error in the log:
AttributeError: 'NoneType' object has no attribute 'state'
This happened when the referenced entity, such as an input_boolean or a template binary_sensor, wasn't loaded yet when Circadian Lighting started. The switch was never created, so your lights stopped adjusting.
Switches now load normally. During startup, a switch doesn't adjust lights until its sleep or disable entity has loaded, so lights aren't set to daytime values and then corrected. If the entity still doesn't exist after Home Assistant has finished starting (for example, because of a typo), the switch carries on without it and logs a warning.
Clear error for incomplete sleep or disable settings
sleep_entity and sleep_state must now be set together, and so must disable_entity and disable_state.
- Entity without its state: this used to crash the switch while loading, with a
TypeError. You now get a configuration error that tells you what's missing. - State without its entity: this used to be ignored silently. It's now also a configuration error.
If a switch doesn't load after you update, check your Home Assistant log for must be set together and add the missing option, or remove both.
Thanks to @roofuskit and @markheloking for testing the beta.
Full Changelog: 2.1.6...2.1.7