Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (39 sloc) 1.17 KB
---
alias: Lighting Scene - Livingroom
trigger:
- platform: state
entity_id: switch.occ_room_livingroom
from: 'off'
to: 'on'
- entity_id: sensor.light_scene
platform: state
- platform: state
entity_id: binary_sensor.motion_gf_living
from: 'off'
to: 'on'
- platform: state
entity_id: binary_sensor.id_living
from: 'off'
to: 'on'
#- entity_id: sensor.family_family_state_raw
# platform: state
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.family_family_state_raw
below: 7 # Anyone Awake
above: 1
- condition: template
value_template: "{{ not is_state('sensor.house_scene', 'Going To Bed') }}"
- condition: template
value_template: "{{ not is_state('sensor.house_scene', 'Asleep') }}"
- condition: template
value_template: "{{ not is_state('sensor.house_scene', 'Coming Home') }}"
action:
- service: scene.turn_on
data_template:
entity_id: scene.light_{{ states.sensor.light_scene.state.lower() | replace(" ", "_") }}_livingroom
- service: scene.turn_on
data_template:
entity_id: scene.light_{{ states.sensor.light_scene.state.lower() | replace(" ", "_") }}_hallway
You can’t perform that action at this time.