This script/blueprint can be used to transition a light’s brightness and color temperature along a parabolic curve. I personally call it in an automation as a gentle wakeup alarm in the morning. The blueprint github repository can be found here.
For reference, here are some example parabolic curves:
Note that the number in superscript after the x is the “exponent” which you would provide to the script to get the curve you desire. All numbers greater than 0 should work.
This script was originally inspired by Steriku’s work on a parabolic alarm, which can be found here.
This is my first attempt at a home assistant script, so if there are rough edges let me know so I can iron them out. Tons of credit goes to Steriku for building the original script that I overhauled to make this one. Their script was invaluable as a reference and a template while I experimented/learned how to build half of this stuff.
For future improvements, my goal is to adapt this script to accept multiple lights instead of a single light. The challenges I foresee (and could use some help figuring out) are as follows:
- The ability to stop adapting lights that receive commands from other sources, e.g. if a user manually sets the brightness/color/state of a light stop adapting that one (and keep adapting the rest). Similar to the check in the current script to only adapt the light if it remains on, but more robust and with multiple lights.
- Adapting each light from its own starting brightness/color temperature. Honestly this one may be insurmountable. Without running separate instances of the repeat block for each light with their own variables I don’t see how it can be done. But I’m a noob so maybe y’all have an awesome answer.