From 0f9a0489dcfc7c3aa6e80bcd1ebe9ca48c985c64 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Tue, 6 Jul 2021 08:52:04 +0200 Subject: [PATCH] Add bedroom bed button --- .../automations/bedroom-bed-button.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 configuration/automations/bedroom-bed-button.yaml diff --git a/configuration/automations/bedroom-bed-button.yaml b/configuration/automations/bedroom-bed-button.yaml new file mode 100644 index 0000000..c71c23e --- /dev/null +++ b/configuration/automations/bedroom-bed-button.yaml @@ -0,0 +1,60 @@ +- id: bedroom-bed-lamp + alias: '[Bedroom] Bed Button Lamp' + trigger: + - device_id: 0d584dbfe721e00880b38c4dfc1c108e + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_off + action: + - choose: + - conditions: + - condition: state + entity_id: light.bed_lamp + state: 'on' + sequence: + - service: light.turn_off + entity_id: light.bed_lamp + - service: light.turn_off + entity_id: light.bed_lightstrip + - service: light.turn_off + entity_id: light.bedroom_lights + - conditions: + - condition: state + entity_id: light.bed_lamp + state: 'off' + sequence: + - choose: + - conditions: + - condition: state + entity_id: input_select.home_mode + state: Night + sequence: + - service: light.turn_on + entity_id: light.bed_lamp + data: + brightness_pct: 10 + kelvin: 2000 + default: + - service: light.turn_on + entity_id: light.bed_lamp + data: + brightness_pct: 30 + kelvin: 3200 + +- id: bedroom-bed-sleep + alias: '[Bedroom] Bed Sleep' + trigger: + - device_id: 0d584dbfe721e00880b38c4dfc1c108e + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + condition: + - condition: not + conditions: + - condition: state + entity_id: input_select.home_mode + state: Away + action: + - service: script.good_night