bedtime announcements

This commit is contained in:
CeeWeasel
2024-04-30 13:01:01 -04:00
parent 2be72e5764
commit 4bc7f3a60d
3 changed files with 31 additions and 22 deletions
+5 -4
View File
@@ -28,13 +28,14 @@ action:
- choose:
- conditions:
- condition: template
value_template: "{{states('media_player.announcements') == 'unknown' }}"
value_template: "{{states('media_player.announcements') == 'unknown' or states('media_player.announcements') == 'unavailable' }}"
sequence:
- service: script.make_clever_announcement
data:
entity_id:
- media_player.bathroom_mini
- media_player.computer_area_hub
- media_player.kitchen
- media_player.utility_room_clock
media_content_id: >-
{% if is_state('input_boolean.emmett_home', 'on') %}
{% if is_state('input_boolean.bridget_home', 'on') %}
@@ -57,7 +58,7 @@ action:
{% elif is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_ebin.mp3
{% endif %}
volume: 0.5
volume: 0.7
default:
- service: script.make_clever_announcement
data:
@@ -84,7 +85,7 @@ action:
{% elif is_state('input_boolean.ebin_home', 'on') %}
media-source://media_source/local/Sounds/tts/goodnight_ebin.mp3
{% endif %}
volume: 0.5
volume: 0.7
# Because of how we're calling the script, the automation won't continue until the script is done, so we don't need a delay here
#- delay: '00:00:10'