From bcd8c04b30b3c58cc1a5915a14065eaac4c5fb29 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Fri, 18 Aug 2023 21:04:28 +0200 Subject: [PATCH] Add office keylight button automations --- .../automations/info-unavailable-notice.yaml | 6 ++ .../automations/office-keylight-button.yaml | 99 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 configuration/automations/office-keylight-button.yaml diff --git a/configuration/automations/info-unavailable-notice.yaml b/configuration/automations/info-unavailable-notice.yaml index 07f16ef..e5e246c 100644 --- a/configuration/automations/info-unavailable-notice.yaml +++ b/configuration/automations/info-unavailable-notice.yaml @@ -418,6 +418,12 @@ platform: device type: device_offline subtype: device_offline + # Office Keylight button + - device_id: 800c754de6e6b10259f371adc123b909 + domain: zha + platform: device + type: device_offline + subtype: device_offline # Office Motion Sensor - device_id: 5dc8b6e216588033d4d31d8c3d561d70 domain: zha diff --git a/configuration/automations/office-keylight-button.yaml b/configuration/automations/office-keylight-button.yaml new file mode 100644 index 0000000..5399a50 --- /dev/null +++ b/configuration/automations/office-keylight-button.yaml @@ -0,0 +1,99 @@ +- id: office_keylight_button_toggle + alias: '[Office] Keylight button toggle' + mode: single + trigger: + - device_id: 800c754de6e6b10259f371adc123b909 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + condition: + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: light.toggle + data: { } + target: + entity_id: light.elgato_gw33l1a00453 + +- id: office_keylight_button_brightness_up + alias: '[Office] Keylight button brightness up' + mode: single + trigger: + - device_id: 800c754de6e6b10259f371adc123b909 + domain: zha + platform: device + type: remote_button_short_press + subtype: dim_up + condition: + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: light.turn_on + data: + brightness_step_pct: 10 + target: + entity_id: light.elgato_gw33l1a00453 + +- id: office_keylight_button_brightness_down + alias: '[Office] Keylight button brightness down' + mode: single + trigger: + - device_id: 800c754de6e6b10259f371adc123b909 + domain: zha + platform: device + type: remote_button_short_press + subtype: dim_down + condition: + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: light.turn_on + data: + brightness_step_pct: -10 + target: + entity_id: light.elgato_gw33l1a00453 + +- id: office_keylight_button_left + alias: '[Office] Keylight button left' + mode: single + trigger: + - device_id: 800c754de6e6b10259f371adc123b909 + domain: zha + platform: device + type: remote_button_short_press + subtype: left + condition: + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: light.turn_on + data_template: + color_temp: "{{ state_attr('light.elgato_gw33l1a00453', 'color_temp')|int - 10}}" + target: + entity_id: light.elgato_gw33l1a00453 + +- id: office_keylight_button_right + alias: '[Office] Keylight button right' + mode: single + trigger: + - device_id: 800c754de6e6b10259f371adc123b909 + domain: zha + platform: device + type: remote_button_short_press + subtype: right + condition: + - condition: state + entity_id: input_select.home_mode + state: Day + action: + - service: light.turn_on + data_template: + color_temp: "{{ state_attr('light.elgato_gw33l1a00453', 'color_temp')|int + 10}}" + target: + entity_id: light.elgato_gw33l1a00453 +