Fix ZHA device ID check for double press

This commit is contained in:
2025-07-27 16:47:53 +01:00
parent 91ee6e3cb1
commit 33bc6165c6
2 changed files with 8 additions and 6 deletions

View File

@@ -314,6 +314,7 @@ variables:
off_double_press_exposed: !input off_double_press_exposed off_double_press_exposed: !input off_double_press_exposed
remote_devices: !input remote_devices remote_devices: !input remote_devices
remote_devices_names: "{{ remote_devices | map('device_attr', 'name') | list }}" remote_devices_names: "{{ remote_devices | map('device_attr', 'name') | list }}"
zha_device_id: "{{ trigger.event.data.device_id if is_zha }}"
condition: condition:
- condition: template - condition: template
value_template: >- value_template: >-
@@ -345,7 +346,7 @@ actions:
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ remote_device }}" device_id: "{{ zha_device_id }}"
command: "on" command: "on"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
@@ -398,7 +399,7 @@ actions:
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ remote_device }}" device_id: "{{ zha_device_id }}"
command: "off" command: "off"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
@@ -468,7 +469,7 @@ actions:
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ remote_device }}" device_id: "{{ zha_device_id }}"
command: "stop_with_on_off" command: "stop_with_on_off"
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1
@@ -526,7 +527,7 @@ actions:
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ remote_device }}" device_id: "{{ zha_device_id }}"
command: "stop_with_on_off" command: "stop_with_on_off"
cluster_id: 8 cluster_id: 8
endpoint_id: 1 endpoint_id: 1

View File

@@ -354,6 +354,7 @@ variables:
remote_devices_names: "{{ remote_devices | map('device_attr', 'name') | list }}" remote_devices_names: "{{ remote_devices | map('device_attr', 'name') | list }}"
on_double_press_exposed: !input on_double_press_exposed on_double_press_exposed: !input on_double_press_exposed
off_double_press_exposed: !input off_double_press_exposed off_double_press_exposed: !input off_double_press_exposed
zha_device_id: "{{ trigger.event.data.device_id if is_zha }}"
condition: condition:
- condition: template - condition: template
value_template: >- value_template: >-
@@ -385,7 +386,7 @@ actions:
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ remote_device }}" device_id: "{{ zha_device_id }}"
command: "on" command: "on"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1
@@ -542,7 +543,7 @@ actions:
- trigger: event - trigger: event
event_type: zha_event event_type: zha_event
event_data: event_data:
device_id: "{{ remote_device }}" device_id: "{{ zha_device_id }}"
command: "off" command: "off"
cluster_id: 6 cluster_id: 6
endpoint_id: 1 endpoint_id: 1