fix: correct is_zha conditions (#19)

This commit is contained in:
Damien
2025-02-11 18:54:43 +01:00
committed by GitHub
parent 90b668aff7
commit c336a88dbf
2 changed files with 2 additions and 2 deletions

View File

@@ -311,7 +311,7 @@ variables:
off_double_press_exposed: !input off_double_press_exposed
remote_devices: !input remote_devices
remote_device: >-
{% set is_zha = trigger.platform == "zha_event" %}
{% set is_zha = trigger.platform == "event" and trigger.event.event_type == "zha_event" %}
{% set is_mqtt = trigger.platform == "mqtt" %}
{% set device_name = trigger.topic.split("/")[1] if is_mqtt else none %}
{{

View File

@@ -222,7 +222,7 @@ variables:
light: !input light
remote_devices: !input remote_devices
remote_device: >-
{% set is_zha = trigger.platform == "zha_event" %}
{% set is_zha = trigger.platform == "event" and trigger.event.event_type == "zha_event" %}
{% set is_mqtt = trigger.platform == "mqtt" %}
{% set device_name = trigger.topic.split("/")[1] if is_mqtt else none %}
{{