Permalink
Cannot retrieve contributors at this time
87 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_persons | |
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') %} | |
30 | |
{% else %} | |
80 | |
{% endif %} | |
- alias: 'Turn on Gang2de light when motion' | |
trigger: | |
- platform: state | |
entity_id: binary_sensor.gang_2de_sensor_260 | |
to: 'on' | |
condition: | |
- condition: state | |
entity_id: group.all_persons | |
state: 'home' | |
- condition: or | |
conditions: | |
- condition: state | |
entity_id: sun.sun | |
state: 'below_horizon' | |
- condition: numeric_state | |
entity_id: sensor.hallway2nd_lux_262 | |
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') %} | |
30 | |
{% else %} | |
80 | |
{% 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_persons | |
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_260 | |
to: 'off' | |
- platform: state | |
entity_id: group.all_persons | |
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 |