Alerts: Template repeat intervals

Hi,

I really like the new alerts feature!
I’m using it, paired with a window sensor, to notify me, when a certain window stays open for too long.
I set it up so that I get a first notification after the window is open for 10 minutes and subsequent notifications in a 2-minute interval.

I think it would be really great if it was possible to use templates to specify the intervals.
In my case, I would “calculate” the interval for the first notification depending on the outside temperature or the thermostat’s setting.
For example it’s not necessary to close the window after 10 minutes if it’s warmer outside than on the inside, or if the thermostat is at minimum setting so it wouldn’t try to heat up a room with an open window.

I’m sure the possibilities are endless… :slight_smile:

Sebastian

Would it be possible to do this calculations using an template in the repeat list?
edit: what i mean is, can’t you already do this using the existing template stuff?

That doesn’t seem to work. Doing something like

repeat:
  - {%- if states.sensor.yweather_temperature.state | int > 20  -%}20{%- else -%}10{%- endif -%}

just causes the config parser to fail.

Sebastian