Automation with time_pattern using state of an input_number

If you use my trigger in your automation, that will work as expected provided the interval is an integer factor of 60.

Alternatively:

trigger:
  - platform: time
    at: input_datetime.ora_inizio_avviso_temp_bassa
  - platform: state
    entity_id: automation.ENTITY_ID
    attribute: last_triggered
    for:
      minutes: "{{ states('input_number.frequenza_avviso_temp_bassa') | int }}"

Rest of the automation as before.

This will trigger at the start time, and whenever it’s been x minutes since the last trigger.

Not sure what will happen if you restart HA or reload automations whilst it’s running.

1 Like