From 73d0642f74f066074d28867c82603c2f97819063 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Mon, 7 Jun 2021 11:06:46 +0200 Subject: [PATCH] Add automation for bed automation --- .../automations/bedroom-bed-motion.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 configuration/automations/bedroom-bed-motion.yaml diff --git a/configuration/automations/bedroom-bed-motion.yaml b/configuration/automations/bedroom-bed-motion.yaml new file mode 100644 index 0000000..a860d51 --- /dev/null +++ b/configuration/automations/bedroom-bed-motion.yaml @@ -0,0 +1,36 @@ +- id: bedroom-bed-motion-night + alias: '[Bedroom] Bed motion night' + mode: single + trigger: + - platform: state + entity_id: binary_sensor.bedroom_bed_motion_sensor_ias_zone + from: 'off' + to: 'on' + action: + - choose: + - conditions: + - condition: state + entity_id: input_select.home_mode + state: Night + sequence: + - service: light.turn_on + entity_id: light.bed_lightstrip + data: + brightness_pct: 5 + rgb_color: + - 255 + - 0 + - 0 + +- id: bedroom-bed-motion-off + alias: '[Bedroom] Bed motion Off' + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.bedroom_bed_motion_sensor_ias_zone + for: '0:01:00' + from: 'on' + to: 'off' + action: + - service: light.turn_off + entity_id: light.bed_lightstrip