Open door notification

I want door notification every 10 min til door is closed. What i need more to add in automation ?
Automation:

- id: '1624085804494'
  alias: Door notification
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.front_door
    to: 'on'
    for:
      hours: 0
      minutes: 10
      seconds: 0
  condition: []
  action:
  - service: tts.google_translate_say
    data:
      entity_id: media_player.xxxxx
      message: Door is open, You should close it.
      language: 'en'
  - repeat:
      until:
      - condition: state
        entity_id: binary_sensor.front_door
        state: 'off'
        for:
          hours: 0
          minutes: 0
          seconds: 10
  mode: single

If you want it every 10 mins till closed you will need to trigger on time pattern, every 10 mins and condition with door state.

1 Like