Im creating a template trigger that runs when i set an alarm time on the dashboard but it doesnt run and I cant figure out why. When i test the template in the developter tools it is changing from False to True. The action itself runs aswell when i manually trigger the automation.
Can anyone explain what is happening and what im missing?
Also note that it’s not a great idea to use == when comparing times, since they can have microsecond accuracy. And any template with now() will only get rendered once per minute. So it would almost certainly never trigger.
And the trigger will fire on the transition from false to true so it makes no difference how long it remains in the true state. As long as it transitions back to false at some point before you need it to trigger again. And the code I’ve suggested will transition to false at midnight.
Edit: ninja’d by 123; his suggestion is better anyway. But I’m leaving mine here to help you understand a little more about templates and template triggers.