2023-06-12 21:56:22 +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
|
2023-09-22 22:54:55 +00:00
|
|
|
entity_id: media_player.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
|
|
|
|
2023-06-12 21:56:22 +00:00
|
|
|
- id: bedroom_tv_off
|
2022-08-07 21:55:25 +00:00
|
|
|
alias: '[Bedroom] TV Off'
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
2023-09-22 22:54:55 +00:00
|
|
|
entity_id: media_player.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
|
|
|
|
2023-06-12 21:56:22 +00:00
|
|
|
- id: bedroom_tv_turn_off_at_night
|
2022-12-08 07:53:47 +00:00
|
|
|
alias: '[Bedroom] TV turn off at night'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
2023-09-22 22:54:55 +00:00
|
|
|
- platform: state
|
2023-11-07 01:25:18 +00:00
|
|
|
entity_id:
|
|
|
|
- input_select.home_mode
|
|
|
|
to: Night
|
2023-09-22 22:54:55 +00:00
|
|
|
for:
|
|
|
|
minutes: 30
|
|
|
|
- platform: state
|
|
|
|
entity_id: input_select.home_mode
|
2023-11-07 01:25:18 +00:00
|
|
|
to: Night
|
2023-09-22 22:54:55 +00:00
|
|
|
for:
|
|
|
|
minutes: 60
|
2023-11-07 01:25:18 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: media_player.bedroom_tv
|
|
|
|
to: on
|
|
|
|
for:
|
|
|
|
minutes: 30
|
2023-09-22 22:54:55 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_select.home_mode
|
|
|
|
state: 'Night'
|
2022-12-08 07:53:47 +00:00
|
|
|
action:
|
|
|
|
- service: media_player.turn_off
|
|
|
|
target:
|
|
|
|
entity_id: media_player.bedroom_tv
|
|
|
|
|
2023-06-12 21:56:22 +00:00
|
|
|
- id: bedroom_tv_off_at_night
|
2022-12-08 07:53:47 +00:00
|
|
|
alias: '[Bedroom] TV stay off at night'
|
|
|
|
mode: single
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
2023-09-22 22:54:55 +00:00
|
|
|
entity_id: media_player.bedroom_tv
|
2022-12-08 07:53:47 +00:00
|
|
|
to: 'on'
|
|
|
|
condition:
|
|
|
|
- condition: time
|
2023-09-13 17:51:41 +00:00
|
|
|
before: "09:00:00"
|
|
|
|
after: "01:30:00"
|
2022-12-08 07:53:47 +00:00
|
|
|
action:
|
|
|
|
- service: media_player.turn_off
|
|
|
|
target:
|
|
|
|
entity_id: media_player.bedroom_tv
|
2023-09-13 17:51:41 +00:00
|
|
|
- service: switch.turn_off
|
|
|
|
target:
|
2023-09-22 22:54:55 +00:00
|
|
|
entity_id: media_player.bedroom_tv
|
2023-09-13 17:51:41 +00:00
|
|
|
- service: light.turn_off
|
|
|
|
entity_id:
|
|
|
|
- light.bedroom_lights
|
|
|
|
- light.bed_lightstrip
|
|
|
|
- light.bed_lamps
|