Hello,
I’m trying to do the following. If Someone opens the door and it is not closed after 2 spoken messages, the messages should repeat untill the door is closed
I have an automation to check but it stops after 2 spoken messages. I have another automation to check if the door is closed and I get a message when the door is closed.
I hope someone can help me to get messages until the door is closed.
Thx for looking
alias: Iemand komt binnen
description: Open
trigger:
- platform: state
entity_id:
- binary_sensor.aqara_door_and_window_sensor_p2_deur
from: "off"
to: "on"
condition:
- condition: state
entity_id: binary_sensor.aqara_door_and_window_sensor_p2_deur
state: "on"
enabled: false
action:
- service: media_player.play_media
target:
entity_id: media_player.wekker
data:
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+is+geopend&language=nl
media_content_type: provider
metadata:
title: Voordeur is geopend
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+is+geopend&language=nl
- service: media_player.play_media
target:
entity_id: media_player.radio
data:
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+is+geopend&language=nl
media_content_type: provider
metadata:
title: Voordeur is geopend
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+is+geopend&language=nl
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
- service: media_player.turn_off
metadata: {}
data: {}
target:
device_id:
- 77310f2a090febe47323a226e07fe42c
- 0a35fa3e9ba2c4c2737afeb43ef6b19c
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- choose:
- conditions:
- type: is_not_open
condition: device
device_id: 53a4f102cf90cbd563dd287983462bf5
entity_id: a076c02a70725e1a97e6c4f84667da3d
domain: binary_sensor
sequence:
- service: media_player.play_media
target:
entity_id: media_player.radio
data:
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+is+dicht&language=nl
media_content_type: provider
metadata:
title: Voordeur is dicht
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+is+dicht&language=nl
- conditions:
- type: is_open
condition: device
device_id: 53a4f102cf90cbd563dd287983462bf5
entity_id: a076c02a70725e1a97e6c4f84667da3d
domain: binary_sensor
sequence:
- service: media_player.play_media
target:
entity_id: media_player.radio
data:
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+staat+nog+steeds+open&language=nl
media_content_type: provider
metadata:
title: Voordeur staat nog steeds open
thumbnail: https://brands.home-assistant.io/_/tts/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/tts.google_en_com?message=Voordeur+staat+nog+steeds+open&language=nl
mode: restart