I have a condition template.
I want to be the condition TRUE when the value_template is TRUE for 30 minutes.
I do NOT want to change anything to the trigger because the timing is aligned with other automation.
While it is supported for template triggers, the docs do not mention for as a valid option for template conditions. You can move you template to a Template binary sensor then use a State condition based on that with a for.
Instead of polling every few minutes, to check if the sensor value is below the input_number for 30 minutes, use a Numeric State Trigger. It will trigger exactly when the sensor’s value is below the input_number for 30 minutes.
Thanks for thinking along, but as I wrote, there is a reason why I want to know this “on 4m, 9m, 14m, … 59m”, so this is not a solution (for me).
I go for Drew’s idea. That is exactly what I need. Not in a template, an extra step, but a useful step. I can recycle these new binary sensors in another place.
I have valves for floor heating that open on a specific time, they take about 3 minutes to open. Than the heatpump can start, otherwise the heatpump powerconsumption is to high. Secondly here in belgium we will be charged peak-power-consumption per 15 minutes, starting at exactly 00, 15, 30, … minutes. To be able to run the heatpump as long as possible without having to interrupt it (and again causing a start), I’m stuck with a timing like this. All of this also takes other appliances in the house into account, each with a specific timing.