Combiine a bunch of Automations.

This commit is contained in:
CCOSTAN
2016-11-10 18:26:44 +00:00
parent 317e576862
commit 42337b9fb5
7 changed files with 141 additions and 119 deletions

View File

@@ -0,0 +1,64 @@
######################################################################
## TV Time at sunset or 8pm. Whichever is later.
######################################################################
- alias: TV Time
trigger:
- platform: sun
event: sunset
offset: '+01:00:00'
- platform: event
event_type: tv_time
- platform: state
entity_id: sensor.samsungtv
state: Online
- platform: time
after: '20:00:00'
condition:
condition: and
conditions:
- condition: state
entity_id: group.family
state: home
- condition: state
entity_id: sensor.samsungtv
state: Online
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: time
after: '20:00:00'
action:
service: scene.turn_on
entity_id: scene.living_room_tv_time
######################################################################
## Turn off the Living room lights when the TV is turned off.
######################################################################
- alias: TV Time off
trigger:
- platform: state
entity_id: sensor.samsungtv
state: offline
condition:
condition: and
conditions:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
service: light.turn_off
entity_id:
- group.living_room
- group.living_room_accents