From a00f77c559f8fce35e439feb5f0562b0d8e6c84b Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 26 Jul 2021 18:59:16 +0200 Subject: [PATCH] Change Kitchen Button --- configuration/automations/kitchen-button.yaml | 103 +++++++----------- 1 file changed, 41 insertions(+), 62 deletions(-) diff --git a/configuration/automations/kitchen-button.yaml b/configuration/automations/kitchen-button.yaml index 3595db6..382fdac 100644 --- a/configuration/automations/kitchen-button.yaml +++ b/configuration/automations/kitchen-button.yaml @@ -131,10 +131,10 @@ brightness_step_pct: -10 # Kitchen sink button -- id: kitchen-sink-button-on - alias: '[Kitchen] Sink Button On' +- id: kitchen-sink-button + alias: '[Kitchen] Sink Button' trigger: - - device_id: a47c928b108240ed8866f9f7a70bc844 + - device_id: 1610374adcb5c5c1a763616a57411eac domain: zha platform: device type: remote_button_short_press @@ -143,54 +143,60 @@ - choose: - conditions: - condition: state - entity_id: input_boolean.sleep_mode + entity_id: light.kitchen_sink_lighstrip state: 'on' sequence: - - service: light.turn_on + - service: light.turn_off entity_id: light.kitchen_sink_lighstrip - data: - brightness_pct: 100 - kelvin: 2000 - conditions: - condition: state - entity_id: input_boolean.sleep_mode + entity_id: light.kitchen_sink_lighstrip state: 'off' sequence: - - service: light.turn_on - entity_id: light.kitchen_sink_lighstrip - data: - brightness_pct: 100 - kelvin: 3200 + - choose: + - conditions: + - condition: state + entity_id: input_boolean.sleep_mode + state: 'on' + sequence: + - service: light.turn_on + entity_id: light.kitchen_sink_lighstrip + data: + brightness_pct: 100 + kelvin: 2000 + - conditions: + - condition: state + entity_id: input_boolean.sleep_mode + state: 'off' + sequence: + - service: light.turn_on + entity_id: light.kitchen_sink_lighstrip + data: + brightness_pct: 100 + kelvin: 3200 mode: single -- id: kitchen-sink-button-off - alias: '[Kitchen] Sink Button Off' +- id: kitchen-sink-button-hold + alias: '[Kitchen] Sink Button Hold' trigger: - - device_id: a47c928b108240ed8866f9f7a70bc844 + - device_id: 1610374adcb5c5c1a763616a57411eac domain: zha platform: device - type: remote_button_short_press - subtype: turn_off - action: - - service: light.turn_off - data: - entity_id: light.kitchen_sink_lighstrip - mode: single - -- id: kitchen-sink-button-hold-on - alias: '[Kitchen] Sink Button Hold On' - trigger: - - platform: event - event_type: zha_event - event_data: - device_id: a47c928b108240ed8866f9f7a70bc844 - command: move_with_on_off + type: remote_button_long_press + subtype: dim_up action: - choose: - conditions: - condition: state - entity_id: input_select.home_mode - state: Day + entity_id: light.kitchen_lights + state: 'on' + sequence: + - service: light.turn_off + entity_id: light.kitchen_lights + - conditions: + - condition: state + entity_id: light.kitchen_lights + state: 'off' sequence: - choose: - conditions: @@ -213,31 +219,4 @@ data: brightness_pct: 100 kelvin: 3200 - - conditions: - - condition: state - entity_id: input_select.home_mode - state: Night - sequence: - - service: light.turn_on - entity_id: light.kitchen_lights - data: - brightness_pct: 5 - kelvin: 2700 mode: single - -- id: kitchen-sink-button-hold-off - alias: '[Kitchen] Sink Button Hold Off' - trigger: - - platform: event - event_type: zha_event - event_data: - device_id: a47c928b108240ed8866f9f7a70bc844 - command: move - args: - - 1 - - 83 - action: - - service: light.turn_off - data: - entity_id: light.kitchen_lights - mode: single \ No newline at end of file