The scenario is my kids can only play video games on weekends and holidays during school. On Sunday the day before school the games stop at 6:00pm unless Monday is a holiday. My question is when there is a holiday on Monday, it wont run of course. But for Monday, Tuesday etc how can I make it run for the next day to check and run the same automation like Sunday. That’s the automation I am trying to accomplish Just to remind them.
Here is my Yaml so far:
alias: Game time is over in 30 mins
description: ""
trigger:
- platform: time
at: "17:30:00"
condition: []
action:
- choose:
- conditions:
- condition: time
weekday:
- sun
- condition: state
entity_id: input_boolean.kids_school_helper
state: "off"
sequence:
- parallel:
- if:
- condition: state
entity_id: media_player.gaming_tv_s_kids
state: playing
then:
- service: media_player.media_play_pause
data: {}
target:
entity_id:
- media_player.gaming_tv_s_kids
- service: tts.speak
data:
cache: true
media_player_entity_id: media_player.google_nest
message: >-
Just a reminder, that you have 30 minutes left until game
time is over.
target:
entity_id: tts.google_en_com
- service: notify.alexa_media_jamar_echo_2
data:
message: >-
Just a reminder, that you have 30 minutes left until game
time is over.
- service: tts.speak
data:
cache: true
media_player_entity_id: media_player.paris_google_mini
message: >-
Just a reminder, that you have 30 minutes left until game
time is over.
target:
entity_id: tts.google_en_com
- service: notify.alexa_media_animeking_echo_dot
data:
message: >-
Just a reminder, the kids have 30 minutes left until game
time is over.
- if:
- condition: state
entity_id: media_player.gaming_tv_s_kids
state: paused
then:
- service: media_player.media_play_pause
data: {}
target:
entity_id:
- media_player.gaming_tv_s_kids
- conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- condition: state
entity_id: input_boolean.kids_school_helper
state: "on"
sequence:
- parallel:
- if:
- condition: state
entity_id: media_player.gaming_tv_s_kids
state: playing
then:
- service: media_player.media_play_pause
data: {}
target:
entity_id:
- media_player.gaming_tv_s_kids
- service: tts.speak
data:
cache: true
media_player_entity_id: media_player.google_nest
message: >-
Just a reminder, that you have 30 minutes left until game
time is over.
target:
entity_id: tts.google_en_com
- service: notify.alexa_media_jamar_echo_2
data:
message: >-
Just a reminder, that you have 30 minutes left until game
time is over.
- service: tts.speak
data:
cache: true
media_player_entity_id: media_player.paris_google_mini
message: >-
Just a reminder, that you have 30 minutes left until game
time is over.
target:
entity_id: tts.google_en_com
- service: notify.alexa_media_animeking_echo_dot
data:
message: >-
Just a reminder, the kids have 30 minutes left until game
time is over.
- if:
- condition: state
entity_id: media_player.gaming_tv_s_kids
state: paused
then:
- service: media_player.media_play_pause
data: {}
target:
entity_id:
- media_player.gaming_tv_s_kids
alias: School Day Options
mode: single