I am trying to run a automation where every 2 hours it turns on, wait 1 hour, turn off. Then the trigger should happen again in 2 hours but it never did. This is what I got so far:
Create a timer helper then use that instead. There are simpler methods to achieve your goal, but the following allows for changing the on and off times and lets you pause and restart the cycle easily by cancelling or restarting the timer.
I’m getting this message when trying to use your code:
Message malformed: invalid template (TemplateSyntaxError: invalid syntax for function call expression) for dictionary value @ data['action'][0]['variables']['next_interval']
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.