Files
N22/include/automations/skabsovevaerelse.yaml
T
2022-03-09 06:50:12 +01:00

61 lines
1.4 KiB
YAML

- alias: 'Lys skab Claus'
trigger:
platform: state
entity_id: binary_sensor.hue_motion_sensor_1_motion
to: 'on'
condition:
- condition: numeric_state
entity_id: sensor.hue_motion_sensor_1_illuminance
below: 90
- condition: time
after: '06:00:00'
before: '23:00:00'
action:
- service: homeassistant.turn_on
entity_id:
- light.skab_1
- alias: 'Sluk lys i skab Claus'
trigger:
platform: state
entity_id: binary_sensor.hue_motion_sensor_1_motion
to: 'off'
for:
minutes: 1
action:
service: homeassistant.turn_off
data:
entity_id:
- light.skab_1
- alias: 'Lys skab Anne'
trigger:
platform: state
entity_id: binary_sensor.motion
to: 'on'
condition:
- condition: numeric_state
entity_id: sensor.hue_motion_sensor_1_illuminance_2
below: 90
- condition: time
after: '06:00:00'
before: '23:00:00'
action:
- service: homeassistant.turn_on
entity_id:
- light.skab_1
- alias: 'Sluk lys i skab'
trigger:
platform: state
entity_id: binary_sensor.motion
to: 'off'
for:
minutes: 1
action:
service: homeassistant.turn_off
data:
entity_id:
- light.skab_1