It all works as you’d expect. I want to set the brightness based on the cosine of the time of day. (on at 6am, full power at noon off at 6pm) and it needs to run on the ESP not HA.
I already tried looking at the blueprints stuff, but that’s HA side.
I can create buttons that set the value when pressed, and I briefly had an action that turned things on and off based on time, but I can’t find anything simple enough to get my head around that does the fading, and then extend. Can anyone please help
I haven’t checked the validity of your C++ code, and there may be other ways to achieve the same thing. You may also need to add other checks - but you get the idea…
Thanks @zoogara that was basically what I needed, I tweak it with real C++, but this compiled second attempt, and ran first time (ok, second after I inverted the cosine and multiplied the angle by 2PI):