This commit is contained in:
Edward Firmo
2023-12-18 15:42:51 +01:00
parent 75c9246c5e
commit 4f8a69d2e7

View File

@@ -9523,13 +9523,15 @@ action:
- '{{ nspanel_event.command == "short_click" and entity_domain not in ["climate", "media_player"] }}'
sequence:
- condition: '{{ last_click_button.entity | length > 0 }}'
- condition: '{{ nspanel_event.component != "hw_bt_left" or hardware.buttons.left.entity != relay01_entity }}' ### Prevents blueprint control when locally controlled
- condition: '{{ nspanel_event.component != "hw_bt_right" or hardware.buttons.right.entity != relay02_entity }}' ### Prevents blueprint control when locally controlled
- condition: '{{ nspanel_event.component != "hw_bt_left" or hardware.buttons.left.entity != relay01_entity }}'
- condition: '{{ nspanel_event.component != "hw_bt_right" or hardware.buttons.right.entity != relay02_entity }}'
- &short_press-service_call
if: '{{ true }}'
then:
- service: >
{% if entity_domain in ["cover"] and states(last_click_button.entity) in ["opening", "closing"] and state_attr(last_click_button.entity, "supported_features") | int(0) | bitwise_and(4) == 0 %}
{% if entity_domain in ["cover"]
and states(last_click_button.entity) in ["opening", "closing"]
and state_attr(last_click_button.entity, "supported_features") | int(0) | bitwise_and(4) == 0 %}
{{ entity_domain }}.stop_cover
{% elif entity_domain in ["light", "switch", "cover", "input_boolean", "fan", "remote"] %}
{{ entity_domain }}.toggle