Mine is almost the same ( both the code and Gui ). I still can’t get it to work…
alias: D-Link_Water
description: D-Link Water Leak Notification
trigger:
- platform: state
entity_id: binary_sensor.d_link_water
attribute: friendly_name
from: 'Off'
to: 'On'
for: 00:00:01
condition: []
action:
- service: tts.google_translate_say
data:
message: Water leak detected
language: en
entity_id: media_player.family_room_speaker
Hi guys,
while ago I did a similar automation, change of status is triggering a shell command which in may case is playing a sound from the local speaker of thin client that is running home assistant OS.
alias: EngRm Leakage Water Notification
description: ""
trigger:
- platform: state
entity_id: binary_sensor.engrm_leakage
from: "off"
condition: [ ]
action:
- service: shell_command.play_local_notification2
data: { }
mode: single
where shell command is (in my configuration.yaml, needs reboot)
shell_command:
play_local_notification2: ffplay -loglevel quiet -nodisp -vn -autoexit /media/Sirens/Siren-Tsunami.mp3