[occupancy] Turn lights on

This commit is contained in:
Correl Roush 2018-06-29 20:44:02 -04:00
parent b786659a85
commit 635c86549a
1 changed files with 22 additions and 0 deletions

View File

@ -90,6 +90,28 @@ automation:
{{ from|reject('equalto', 'Correl') | sort
!= to|reject('equalto', 'Correl') | sort
}}
- alias: Turn the lights on
action:
- service: scene.turn_on
data:
entity_id: scene.normal_brightness
trigger:
- entity_id: binary_sensor.occupied
platform: state
to: 'on'
condition:
- condition: state
entity_id: group.all_lights
state: 'off'
- condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
- condition: numeric_state
entity_id: sensor.living_room_camera_light_level
below: 20
input_boolean:
occupied: