2022-08-06 21:41:47 +00:00
|
|
|
- id: bedroom-tv-on
|
2022-08-07 21:55:25 +00:00
|
|
|
alias: '[Bedroom] TV On'
|
2022-08-06 21:41:47 +00:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
2022-08-29 18:12:12 +00:00
|
|
|
entity_id: switch.bedroom_tv
|
2022-08-06 21:41:47 +00:00
|
|
|
to: 'on'
|
2022-08-07 21:55:25 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_select.home_mode
|
|
|
|
state: Day
|
2022-08-06 21:41:47 +00:00
|
|
|
action:
|
|
|
|
- service: script.bedroom_tv_scene
|
2022-08-07 21:55:25 +00:00
|
|
|
|
|
|
|
- id: bedroom-tv-off
|
|
|
|
alias: '[Bedroom] TV Off'
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
2022-08-29 18:12:12 +00:00
|
|
|
entity_id: switch.bedroom_tv
|
2022-08-07 21:55:25 +00:00
|
|
|
to: 'off'
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_select.home_mode
|
|
|
|
state: Day
|
|
|
|
action:
|
|
|
|
- service: script.bedroom_tv_off_scene
|
2022-12-08 07:53:47 +00:00
|
|
|
|
|
|
|
- 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
|