Node Red: How to trigger on remaining time from hass timer

Hello,

I have a timer in hass which i can set with a input_number i can start the timer with a play and pause button.
I want to trigger in Node Red 2min. before the timer is finished.
The remaining time attribute of the timer is a fixed time and only changed when the timer is paused or reset. It is not the live remaining time.

But when i add the timer as an entity in a entities card, i get the live remaining time counting down.
image
How can i trigger on that time in Node Red?

Could you just have a second timer that is set to the input_number minus 2 minutes? Then trigger NR on that.

Yes that could proberly an option. how can i template the timer that the value is the timer minus 2minutes?

Let me prefix this by saying I’m not super familiar with timers as I don’t really use them myself. But looking in the docs it looks like there are timer events fired when you take actions on timers. You can listen for those events in node RED using the events: all node and then take actions accordingly.

So if you had a second timer like @michaelblight is talking about then when you receive the timer.started event you could pull the value of your input_number helper, subtract 2 from it using a change node and then call the start timer service on your second timer.

You could also use this same trick with the other actions you provide in that UI. When you receive timer.paused or timer.restarted you map those into the equivalent service calls on your second timer.