i am trying to send a notification via alert integration when my windows are open too long. Sending a notification to the Android Companion App is easy, but how can I integrate a media_player as a notify service that just plays a sound file (no tts)?
action:
- service: notify.mobile_app_in2013
data:
message: >-
Hallo, een van de ramen staat open. Buiten is het minder, dan tien
graden. Ik heb de verwarming uitgeschakeld. Ik zet het pas weer aan, als
het raam weer dicht is.
- service: notify.mobile_app_mischa_op6t
data:
message: >-
Hallo, een van de ramen staat open. Buiten is het minder, dan tien
graden. Ik heb de verwarming uitgeschakeld. Ik zet het pas weer aan, als
het raam weer dicht is.
- service: media_player.play_media
target:
entity_id: media_player.vlc_telnet
data:
media_content_id: http://192.XXX.XXX.XX:8123/local/ns-ding-dong.mp3
media_content_type: music
The mp3 file has to be in your config/www/ directory
OK, sorry my bad - maybe the correct question should have been, why if limited by the alert integration, not maybe use a standard automation with a repeat to achieve the same thing but without the limitations?
I do feel that the “alert” integration has been kind of left behind. There is no frontend editor for it and, as you’ve pointed out, the limitations on what it can “notify” are pretty strict.
I’d like to see “alert” merged into automation as a trigger type, I think that would be the best of both worlds. The example of a open garage door that exists on the page is prime. I use android tablets in the house as “announcers” for things but with the “alert” I cannot specify a command other than a “notify” so I cannot use “alert” to send the mqtt packet to have the tablet say “Hey, the garage door has been open for over an hour!”