Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (84 sloc) 2.21 KB
- alias: 'Turn on Gang1ste light when motion'
trigger:
- platform: state
entity_id: binary_sensor.gang_1ste_sensor_170
to: 'on'
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
- condition: or
conditions:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: numeric_state
entity_id: sensor.hallway1st_lux_183
below: 1
action:
- service: light.turn_on
data_template:
entity_id: light.overloop_licht_1ste_44
brightness: >
{% if is_state('input_boolean.night_mode', 'on') %}
40
{% else %}
100
{% endif %}
- alias: 'Turn on Gang2de light when motion'
trigger:
- platform: state
entity_id: binary_sensor.gang_2de_sensor_159
to: 'on'
condition:
- condition: state
entity_id: group.all_devices
state: 'home'
- condition: or
conditions:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: numeric_state
entity_id: sensor.hallway2nd_lux_187
below: 1
action:
- service: light.turn_on
data_template:
entity_id: light.overloop_licht_2de_132
brightness: >
{% if is_state('input_boolean.night_mode', 'on') %}
40
{% else %}
100
{% endif %}
- alias: 'Turn off Gang1ste light'
trigger:
- platform: state
entity_id: binary_sensor.gang_1ste_sensor_170
to: 'off'
- platform: state
entity_id: group.all_devices
to: 'not_home'
condition:
- condition: state
entity_id: light.overloop_licht_1ste_44
state: 'on'
action:
- service: light.turn_off
entity_id: light.overloop_licht_1ste_44
- alias: 'Turn off Gang2de light'
trigger:
- platform: state
entity_id: binary_sensor.gang_2de_sensor_159
to: 'off'
- platform: state
entity_id: group.all_devices
to: 'not_home'
condition:
- condition: state
entity_id: light.overloop_licht_2de_132
state: 'on'
action:
- service: light.turn_off
entity_id: light.overloop_licht_2de_132