fix: correct is_zha conditions (#19)
This commit is contained in:
@@ -311,7 +311,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_device: >-
|
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 is_mqtt = trigger.platform == "mqtt" %}
|
||||||
{% set device_name = trigger.topic.split("/")[1] if is_mqtt else none %}
|
{% set device_name = trigger.topic.split("/")[1] if is_mqtt else none %}
|
||||||
{{
|
{{
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ variables:
|
|||||||
light: !input light
|
light: !input light
|
||||||
remote_devices: !input remote_devices
|
remote_devices: !input remote_devices
|
||||||
remote_device: >-
|
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 is_mqtt = trigger.platform == "mqtt" %}
|
||||||
{% set device_name = trigger.topic.split("/")[1] if is_mqtt else none %}
|
{% set device_name = trigger.topic.split("/")[1] if is_mqtt else none %}
|
||||||
{{
|
{{
|
||||||
|
|||||||
Reference in New Issue
Block a user