1
0

Add bedroom tv off automation

This commit is contained in:
Przemek Grondek 2022-08-07 23:55:25 +02:00
parent 77e6c4b901
commit ae247e929a
2 changed files with 43 additions and 3 deletions

View File

@ -1,8 +1,25 @@
- id: bedroom-tv-on
alias: '[Bedroom] TV ON'
alias: '[Bedroom] TV On'
trigger:
- platform: state
entity_id: media_player.bedroom_tv
to: 'on'
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: script.bedroom_tv_scene
- id: bedroom-tv-off
alias: '[Bedroom] TV Off'
trigger:
- platform: state
entity_id: media_player.bedroom_tv
to: 'off'
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: script.bedroom_tv_off_scene

View File

@ -106,8 +106,31 @@ bedroom_tv_scene:
entity_id: light.bedroom_lights
- service: light.turn_off
entity_id: light.bed_lightstrip
- service: light.turn_off
- service: cover.close_cover
entity_id: cover.bedroom_blinds
bedroom_tv_off_scene:
alias: '[Bedroom] TV Off scene'
sequence:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
above: '30'
sequence:
- service: cover.open_cover
entity_id: cover.office_blinds
- conditions:
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '31'
sequence:
- service: light.turn_on
entity_id: light.bed_lamps
data:
transition: 60
brightness_pct: 100
kelvin: 2000
bedroom_bed_lamp_off:
alias: '[Bedroom] Bed lamps off'