I have several automations with triggers or conditions as times clustering around my getting up time in the morning. I wanted to make them more flexible and found a solution in an earlier thread here. Only I can’t get it to work. In the following example the first trigger is my current one using a fixed time. The third works as intended and the second is the solution I found. I can’t get that to work. (Yes, I entered a time twenty minutes after I wanted the trigger to fire.) Any ideas why?
Thank you for pointing me to that tool. It’s great help and makes things much easier. I had tried out several things without it beforehand, though, all to no avail. And, as I said, that template was taken from a former solution here
Unfortunately even with the template tester I can’t find it. I get
“ValueError: could not convert str to datetime: ‘input_datetime.aufstehen’”
without quotes:
“‘input_datetime’ is undefined”
without the first part to the dot:
‘"aufstehen’ is undefined"
Sorry, can’t do it on my own.
Danke
I believe I also found what it was. After the minute changes on my computer it takes a bit until the trigger kicks in. Either the Raspberry’s time is a bit off or more probably there is a slight delay. Seens I didn’t wait but went right back into the automation.
Thanks for your patience and help again.
Why don’t you define a template helper which calculates eg 10 minutes before input_datetime.reveal as datetime? Then trigger on the time of that helper and you have a solution that is not evaluated every minute.
This would not be re-usable in the sense if I should want action A 10 mins before set time and action B 3 hours prior to set time. Having a helper for every action would also be impractical.