1
0

Bedroom tv turn off after 30 minutes

This commit is contained in:
Przemek Grondek 2023-09-23 00:54:55 +02:00
parent 23c7ce3f5c
commit 1c3b54c35b

View File

@ -2,7 +2,7 @@
alias: '[Bedroom] TV On'
trigger:
- platform: state
entity_id: switch.bedroom_tv
entity_id: media_player.bedroom_tv
to: 'on'
condition:
- condition: state
@ -15,7 +15,7 @@
alias: '[Bedroom] TV Off'
trigger:
- platform: state
entity_id: switch.bedroom_tv
entity_id: media_player.bedroom_tv
to: 'off'
condition:
- condition: state
@ -28,8 +28,20 @@
alias: '[Bedroom] TV turn off at night'
mode: single
trigger:
- platform: time
at: "01:30:00"
- platform: state
entity_id: input_select.home_mode
state: 'Night'
for:
minutes: 30
- platform: state
entity_id: input_select.home_mode
state: 'Night'
for:
minutes: 60
condition:
- condition: state
entity_id: input_select.home_mode
state: 'Night'
action:
- service: media_player.turn_off
target:
@ -40,7 +52,7 @@
mode: single
trigger:
- platform: state
entity_id: switch.bedroom_tv
entity_id: media_player.bedroom_tv
to: 'on'
condition:
- condition: time
@ -52,7 +64,7 @@
entity_id: media_player.bedroom_tv
- service: switch.turn_off
target:
entity_id: switch.bedroom_tv
entity_id: media_player.bedroom_tv
- service: light.turn_off
entity_id:
- light.bedroom_lights