Have alexa repeat announcement until sliding door is closed?

- alias: 'Sliding door left open'
  initial_state: true
  trigger:
    platform: state
    entity_id: binary_sensor.sliding_back_door
    to: 'on'
  action:
    - service: notify.alexa_media
      data:
        target: 
          - media_player.everywhere
        #title: "My title for Echo show"
        data:
          type: announce
          #method: all
        message: "Sliding door is open"

Can i use this? https://github.com/home-assistant/home-assistant/pull/5201

Yes you can use this:

i dont have an input_boolean for my sliding glass door…

It does not have to be an input boolean. It can be a binary sensor.

alert:
  sliding_door:
    name: Sliding door is open
    message: Sliding door is open
    done_message: Sliding door is closed
    entity_id: binary_sensor.sliding_back_door
    state: 'on'
    repeat: 30
    can_acknowledge: true
    skip_first: false
    notifiers:
      - notify.alexa_media
1 Like
  - alert:
      sliding_door:
        name: Sliding door is open
        done_message: Sliding door is closed
        entity_id: binary_sensor.sliding_back_door
        state: 'on'
        repeat: 30
        can_acknowledge: true
        skip_first: false
        notifiers:
          - notify.alexa_media

I put this in my sensors.yaml file and it didn’t work :frowning:

That’s because it’s not a sensor, it’s an alert.

Put it in your configuration.yaml file

Also read the alert docs, you will have to create a notification group for this:

      data:
        target: 
          - media_player.everywhere

Hi David, did you work this out in the end? I am trying to do something similar with my Alexas (repeat the action of alerting that something has happened)?

You can now do this easily with the new action repeat until…