From f24a0819d180c42b52f60ec2daae19e955c745e9 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Wed, 13 Jan 2021 00:34:38 +0100 Subject: [PATCH] Add kitchen motion automations --- automations/files/kitchen-motion.yaml | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 automations/files/kitchen-motion.yaml diff --git a/automations/files/kitchen-motion.yaml b/automations/files/kitchen-motion.yaml new file mode 100644 index 0000000..c502fe7 --- /dev/null +++ b/automations/files/kitchen-motion.yaml @@ -0,0 +1,51 @@ +- id: kitchen-motion-dark + alias: '[Kitchen] Motion day dark' + mode: single + trigger: + - platform: state + entity_id: binary_sensor.kitchen_motion_sensor + from: 'off' + to: 'on' + condition: + - condition: numeric_state + entity_id: sensor.kitchen_motion_luminance + below: '50' + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: light.turn_on + entity_id: light.kitchen_lights + data: + brightness_pct: 90 + kelvin: 2000 +- id: kitchen-motion-night + alias: '[Kitchen] Motion night' + mode: single + trigger: + - platform: state + entity_id: binary_sensor.kitchen_motion_sensor + from: 'off' + to: 'on' + condition: + - condition: state + entity_id: input_select.home_mode + state: Night + action: + - service: light.turn_on + entity_id: light.kitchen_lights + data: + brightness_pct: 5 + kelvin: 2000 +- id: kitchen-motion-off + alias: '[Kitchen] Motion Off' + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.kitchen_motion_sensor + for: '0:02:00' + from: 'on' + to: 'off' + action: + - service: light.turn_off + entity_id: light.kitchen_lights