Shortest variant to repeatedly send a message based on a status

i’m sure there are lots of ways to do this. and someone will come with a more efficient way. however, here’s one way for you that combines into one automation.

description: ""
mode: single
trigger:
  - platform: state
    entity_id:
      - cover.garage_door
    for:
      hours: 1
    to: open
  - platform: state
    entity_id:
      - cover.garage_door
    for:
      hours: 2
    to: open
  - platform: state
    entity_id:
      - cover.garage_door
    for:
      hours: 4
    to: open
condition: []
action:
  - service: notify.send_message
    metadata: {}
    data:
      message: door is opened for {{ elapsed_time(trigger.to_state.last_changed) }}

btw… this converts you from using device id to entity_id… which you should generally do… here’s more info: