hass-circadian_lighting
hass-circadian_lighting copied to clipboard
Move to single switch and UI configurable (preparation for PR into homeassistant/core)
Just leaving this here for feedback.
Inspired by #114, I have heavily simplified the setup. Now it's just a single switch that can take all of the settings.
I plan to add this to core soon, as a replacement for Flux.
P.S., don't mind the name switching from Circadian -> Adaptive, I just did a find + replace all to have the original circadian_lighting
and this code side by side in my config.
TODO:
- [ ] make it work well with groups
- [x] set all the correct UI elements
- [x] integrate the config_validation option parsing
- [x] respond to events instead of state changes, then don't do anything on HA restart
This is how the setup looks in the UI:
while you're still busy doing awesome work, i noticed you added a sunset_time
and sunrise_time
. I assume this overrides the sunset/sunrise times for the configured location.
I was wondering, is it much work to also add (or change it into) a min_sunset_time
and max_sunrise_time
? So the lights will be on longer if the days are longer, but with long nights it will keep a certain minimum day?
while you're still busy doing awesome work, i noticed you added a
sunset_time
andsunrise_time
. I assume this overrides the sunset/sunrise times for the configured location.I was wondering, is it much work to also add (or change it into) a
min_sunset_time
andmax_sunrise_time
? So the lights will be on longer if the days are longer, but with long nights it will keep a certain minimum day?
Please create an issue for this request, thanks!
@basnijholt Another busy weekend for me so I haven't had the chance to even look over the commits yet. Does this still allow for toggling CL on/off for different sets of lights at different times?
@claytonjn, yes, one is still able to do everything that the integration could do before. Here all the settings just go to the switch.
Pretty cool new change, I removed lights_brightness
, lights_mired
, lights_rgb
, lights_xy
. Now it's just lights
and the integration will figure out what a light supports.
@ChessSpider, @pixeye33, @forstermatth (ppl who liked this PR), I have now submitted this code to the home-assistant/core
repo: https://github.com/home-assistant/core/pull/40626 :tada: