From 1c25a6ee237f8514a71cc2886f600216c8c9816f Mon Sep 17 00:00:00 2001 From: pgrondek Date: Mon, 10 May 2021 11:26:11 +0200 Subject: [PATCH] Add bathroom door sensor automations --- automations/files/automations/alarm.yaml | 4 +++ .../files/automations/bathroom-door.yaml | 34 +++++++++++++++++++ .../files/automations/bathroom-motion.yaml | 20 ----------- 3 files changed, 38 insertions(+), 20 deletions(-) create mode 100644 automations/files/automations/bathroom-door.yaml diff --git a/automations/files/automations/alarm.yaml b/automations/files/automations/alarm.yaml index 08a6aa1..9a5089b 100644 --- a/automations/files/automations/alarm.yaml +++ b/automations/files/automations/alarm.yaml @@ -17,6 +17,10 @@ - platform: state entity_id: binary_sensor.shower_motion to: 'on' +# Use open/close sensors + - platform: state + entity_id: binary_sensor.bathroom_door_open_close + to: 'open' - platform: state entity_id: binary_sensor.bedroom_window_open_close to: 'open' diff --git a/automations/files/automations/bathroom-door.yaml b/automations/files/automations/bathroom-door.yaml new file mode 100644 index 0000000..6194578 --- /dev/null +++ b/automations/files/automations/bathroom-door.yaml @@ -0,0 +1,34 @@ +- id: bathroom-door-day + alias: '[Bathroom] Door Open Day' + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.bathroom_door_open_close + to: 'on' + condition: + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: light.turn_on + entity_id: light.bathroom_lights + data: + brightness_pct: 100 + kelvin: 3200 +- id: bathroom-door-night + alias: '[Bathroom] Door Night' + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.bathroom_door_open_close + to: 'on' + condition: + - condition: state + entity_id: input_select.home_mode + state: Night + action: + - service: light.turn_on + entity_id: light.bathroom_lights + data: + brightness_pct: 5 + kelvin: 2700 diff --git a/automations/files/automations/bathroom-motion.yaml b/automations/files/automations/bathroom-motion.yaml index e12948d..6828249 100644 --- a/automations/files/automations/bathroom-motion.yaml +++ b/automations/files/automations/bathroom-motion.yaml @@ -16,26 +16,6 @@ data: brightness_pct: 100 kelvin: 3200 -- id: bathroom-motion-party - alias: '[Bathroom] Motion Party' - mode: restart - trigger: - - platform: state - entity_id: binary_sensor.bathroom_motion_occupancy - from: 'off' - to: 'on' - condition: - - condition: state - entity_id: input_select.home_mode - state: Party - action: - - service: light.turn_on - entity_id: - - light.bathroom_lights - - light.bathroom_mirror_lights - data: - brightness_pct: 100 - kelvin: 3200 - id: bathroom-motion-night alias: '[Bathroom] Motion Night' mode: restart