Files
fresh-home/scripts/master_bedroom/wake_up_the_master_bedroom.yaml
T

41 lines
1.4 KiB
YAML

alias: Wake Up the Master Bedroom
mode: single
icon: mdi:alarm
sequence:
- repeat:
while:
- condition: state
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: "on"
sequence:
- variables:
volume: "{{ 0.5 + (repeat.index * 0.05) }}"
- action: media_player.volume_set
target:
# entity_id: media_player.ma_home_assistant_voice_097b44_media_player
entity_id: media_player.ma_bedroom_hub
data:
volume_level: "{{iif(volume>1,1,volume)}}"
- action: tts.speak
target:
entity_id: tts.google_translate_en_com
data:
# media_player_entity_id: media_player.ma_home_assistant_voice_097b44_media_player
media_player_entity_id: media_player.ma_bedroom_hub
#message: "Pick up the kids at 7 for Donuts with Dads! Its {{ now().strftime('%-I:%M %p') }} so you need to get out of bed and get ready for work and get the kids ready for school"
message: "You have {{ states('todo.local_to_do') }} items on your daily task list: {{ local_todo['todo.local_to_do']['items'] | map(attribute='summary') | list | join(', ') }}"
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- action: input_select.select_option
data:
option: Auto
target:
entity_id: input_select.master_bedroom_mode