I'm trying to figure out the best way to trigger automation once the timer reaches 1 minute before it ends. Is there a good, reliable way to do that? The only two ways (not the best one) I can think of are:
- set second timer with time set to original's time - 1 min and wait for
timer.finishedevent. - in automation, set trigger as template:
{{ (as_timestamp(state_attr('timer.my_timer', 'finishes_at')) - now().timestamp()) | int < 60 }}
As the first one looks like working reliably, it's a bit of overkill to create additional timers and keep them in sync…
The second solution kind of works cause it rarely gets executed at the proper moment (I believe templates can be triggered once every minute or so).
Any other ideas?