I have set up a time helper so I can easily input a “wake up” time every day.
I have 2 scripts that I’d like to call at different times related to the “wake up” time.
First a script should execute that makes the light next to my bed turn on at 1% and fade up, I have a script that does this, and I can trigger it at the “wake up” time but I’d like to set it to happen 20 minutes before the “wake up” time.
Second a script executes that slowly opens my curtains to 50% open over a couple of minutes, gradually increasing the natural light coming in. This one is easy because it just needs to happen at the “wake up” time.
I don’t want to use 2 separate time helpers as this is messy for other users to operate.
So basically I am trying to figure out how to trigger an automation with a negative time offset so it goes off before the time helper value.
I have tried adding
offset: "-00:30:00"
to the trigger but with this added the system will not allow me to save the changes to the automation. It seems to make it invalid.
Not sure if this is still valid, but I solved a similar task using a “helper” helper entity. Meaning, I created one input with the actual alarm time and an additional datetime entity for each automation related to it. To keep this in sync I use a script calculating the actual times for each of the related entities whenever the entity “alarm clock” is updated. Now I can use these “helper” datetime entities to trigger all my automations with a given offset to my alarm clock automatically.