From 5a9956cbcd03bfd217a072709a70094879c1ef42 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Fri, 1 Jan 2021 03:59:21 +0100 Subject: [PATCH] Change Bathroom automations --- automations/files/bathroom-button.yaml | 18 +++++++++++ automations/files/bathroom-mirror-button.yaml | 4 +-- automations/files/bathroom-shower-motion.yaml | 31 +++++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 automations/files/bathroom-button.yaml create mode 100644 automations/files/bathroom-shower-motion.yaml diff --git a/automations/files/bathroom-button.yaml b/automations/files/bathroom-button.yaml new file mode 100644 index 0000000..1433291 --- /dev/null +++ b/automations/files/bathroom-button.yaml @@ -0,0 +1,18 @@ +- id: button-bathroom-on + alias: Button On computer cave + trigger: + - device_id: 800c754de6e6b10259f371adc123b909 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + condition: [] + action: + - service: light.toggle + data: + entity_id: + - light.bathroom_1 + - light.bathroom_2 + - light.bathroom_3 + - light.bathroom_4 + mode: single \ No newline at end of file diff --git a/automations/files/bathroom-mirror-button.yaml b/automations/files/bathroom-mirror-button.yaml index e1f3354..b75d888 100644 --- a/automations/files/bathroom-mirror-button.yaml +++ b/automations/files/bathroom-mirror-button.yaml @@ -1,4 +1,4 @@ -- id: button-bathroom-on +- id: button-bathroom-mirror-on alias: Button On computer cave trigger: - device_id: 4d5298037e93ba11438409bff01b5005 @@ -15,7 +15,7 @@ - light.mirror_middle - light.mirror_right mode: single -- id: button-bathroom-off +- id: button-bathroom-mirror-off alias: Button Off computer cave trigger: - device_id: 4d5298037e93ba11438409bff01b5005 diff --git a/automations/files/bathroom-shower-motion.yaml b/automations/files/bathroom-shower-motion.yaml new file mode 100644 index 0000000..32c6e96 --- /dev/null +++ b/automations/files/bathroom-shower-motion.yaml @@ -0,0 +1,31 @@ +- id: bathroom-shower-motion-on + alias: Bathroom Shower Motion On + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.shower_motion + from: 'off' + to: 'on' + action: + - service: light.turn_on + entity_id: + - light.shower_1 + - light.shower_2 + - light.shower_3 + - light.shower_4 +- id: bathroom-shower-motion-off + alias: Bathroom Shower Motion Off + mode: restart + trigger: + - platform: state + entity_id: binary_sensor.shower_motion + for: '0:01:00' + from: 'on' + to: 'off' + action: + - service: light.turn_off + entity_id: + - light.shower_1 + - light.shower_2 + - light.shower_3 + - light.shower_4