I cobbled together a small plugin exposing a service to set light colors according to the circadian rhythm, inspired by a similar thing for SmartThings.
Not only did I never touch python before, I’m also still finding my way around HA, so it kinda sucks But it should work.
If people are actually interested in this, they can either create a proper repo out of it (and please tell me about it) or message me and I’ll spin it out and accept PRs and issues.
This program is supposed to work only while is day (it ‘simulates’ the sun…). At night the output is constant, for color and for brightness (at night your circadian cycle tells you to sleep!). So if, in automation, you activate it only at night, you will not see it work…
I am working in a component that for the day it works like this, and at night makes a smooth transition to red colors (don’t mess up your circadian cycle with blues at night!).
Soon, I need a few days for testing, I will put a link here.
@vswraith Thanks for the link. I converted that script into a Home-Assistant component. You can drop this file in your custom_components and have HA set your lights like flux. I’ll polish it up and submit a PR soon.
You could create an automation that calls the service flux/update whenever you want to update, similar to the OP’s method. You could then disable/enable the automation.
I also changed the component so it will only modify the light if it’s already on. See PR 2097