diff --git a/configuration/automations/bedroom-tv.yaml b/configuration/automations/bedroom-tv.yaml index 421e5a7..fb077e3 100644 --- a/configuration/automations/bedroom-tv.yaml +++ b/configuration/automations/bedroom-tv.yaml @@ -23,3 +23,30 @@ state: Day action: - service: script.bedroom_tv_off_scene + +- id: bedroom-tv-turn-off-at-night + alias: '[Bedroom] TV turn off at night' + mode: single + trigger: + - platform: time + at: "02:00:00" + action: + - service: media_player.turn_off + target: + entity_id: media_player.bedroom_tv + +- id: bedroom-tv-off-at-night + alias: '[Bedroom] TV stay off at night' + mode: single + trigger: + - platform: state + entity_id: switch.bedroom_tv + to: 'on' + condition: + - condition: time + before: "06:00:00" + after: "02:00:00" + action: + - service: media_player.turn_off + target: + entity_id: media_player.bedroom_tv