From da6bb1e3768d2ce19c876dc7f32eb46149e28084 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Wed, 9 Mar 2022 06:50:12 +0100 Subject: [PATCH] =?UTF-8?q?Skab=20sovev=C3=A6relse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/automations/skabsovevaerelse.yaml | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 include/automations/skabsovevaerelse.yaml diff --git a/include/automations/skabsovevaerelse.yaml b/include/automations/skabsovevaerelse.yaml new file mode 100644 index 0000000..a6202cd --- /dev/null +++ b/include/automations/skabsovevaerelse.yaml @@ -0,0 +1,60 @@ + - 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