diff --git a/Different_switches_zigbee2mqtt.yaml b/Different_switches_zigbee2mqtt.yaml
index 04f613d..94b0d32 100644
--- a/Different_switches_zigbee2mqtt.yaml
+++ b/Different_switches_zigbee2mqtt.yaml
@@ -5,7 +5,7 @@ blueprint:
description: >-
Control any switch you want from different brands and models. Goal is to support as much as possible.
@@ -20,6 +20,7 @@ blueprint:
20250221: triple,quadruple,many added for WXKG01LM
20250221: triple,quadruple,many added for WXKG01LM
20250111: Ikea added
+ 20250412: Added support for WXCJKG13LM to distinguish which button triggers a hold event
***Compatibility list:***
Aqara: Aqara (double) rocker, WXKG07LM, WXKG15LM
@@ -832,6 +833,7 @@ condition:
action:
- variables:
command: '{{ trigger.to_state.attributes.event_type }}'
+ button_attribute: '{{ trigger.to_state.attributes.get("button", "none") }}'
- choose:
- conditions:
- '{{ command == ''on'' }}'
@@ -1002,22 +1004,25 @@ action:
- '{{ command == ''button_6_triple'' }}'
sequence: !input button_6_triple
- conditions:
- - '{{ command == ''button_1_hold'' }}'
+ - '{{ command == ''hold'' and (button_attribute == ''none'' or not button_attribute.startswith(''button_'')) }}'
+ sequence: !input hold
+ - conditions:
+ - '{{ command == ''hold'' and button_attribute == ''button_1'' }}'
sequence: !input button_1_hold
- conditions:
- - '{{ command == ''button_2_hold'' }}'
+ - '{{ command == ''hold'' and button_attribute == ''button_2'' }}'
sequence: !input button_2_hold
- conditions:
- - '{{ command == ''button_3_hold'' }}'
+ - '{{ command == ''hold'' and button_attribute == ''button_3'' }}'
sequence: !input button_3_hold
- conditions:
- - '{{ command == ''button_4_hold'' }}'
+ - '{{ command == ''hold'' and button_attribute == ''button_4'' }}'
sequence: !input button_4_hold
- conditions:
- - '{{ command == ''button_5_hold'' }}'
+ - '{{ command == ''hold'' and button_attribute == ''button_5'' }}'
sequence: !input button_5_hold
- conditions:
- - '{{ command == ''button_6_hold'' }}'
+ - '{{ command == ''hold'' and button_attribute == ''button_6'' }}'
sequence: !input button_6_hold
- conditions:
- '{{ command == ''button_1_release'' }}'