From fe779797bcec092f56de1ab3cd746b1a8d282129 Mon Sep 17 00:00:00 2001 From: Nate Harris Date: Mon, 25 Sep 2023 22:37:15 -0600 Subject: [PATCH] - Change trigger for ERS Knob Z2M --- .../ers_rotary_dial_light_control_z2m.yaml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/home_assistant/blueprints/automations/ers_rotary_dial_light_control_z2m.yaml b/home_assistant/blueprints/automations/ers_rotary_dial_light_control_z2m.yaml index a5a4a35..c463a46 100644 --- a/home_assistant/blueprints/automations/ers_rotary_dial_light_control_z2m.yaml +++ b/home_assistant/blueprints/automations/ers_rotary_dial_light_control_z2m.yaml @@ -63,22 +63,16 @@ blueprint: filter: domain: input_number - base_topic: - name: Zigbee2MQTT Base mqtt topic - description: The base topic configured in Zigbee2MQTT. If you haven't changed this, leave the default here ("zigbee2mqtt") - default: zigbee2mqtt - # Queued, to ignore non-matched events but capture existing ones mode: queued max: 20 max_exceeded: silent -trigger_variables: - base_topic: !input base_topic - trigger: - - platform: mqtt - topic: "{{ base_topic }}/+" + - platform: state + entity_id: !input dial + not_to: "" + attribute: action action: - variables: @@ -93,8 +87,8 @@ action: command: "{{ trigger.to_state.state }}" single_pressed: "{{ command == 'toggle' }}" double_pressed: "{{ command == 'double' }}" - rotated: "{{ command in ['brightness_step_up', 'brightness_step_up'] }}" - positive: "{{ command == 'brightness_step_up' }}" + rotated: "{{ command in ['brightness_step_up', 'brightness_step_down', 'color_temperature_step_up', 'color_temperature_step_down'] }}" + positive: "{{ command in ['brightness_step_up', 'color_temperature_step_up'] }}" step_size: "{{ trigger.to_state.attributes.action_step_size }}" # How many steps to go full rotation (min 13 per step * 20 steps per full rotation) full_rotate_step_count: "{{ 13 * 20 | int }}"