You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get my code working. Any help would be appreciated.
I'm trying to call a script and pass variables to it fro a button toggle_action. I don't really understand how to use the call_service option.
alias: ChangeAirDirection
description:
fields:
entity:
description: entity
required: true
direction:
description: sens de deplacement
example: up / down / left / right
required: true
sequence:
- service: |
{% if direction == "up" or direction == "down" %}
melcloud.set_vane_vertical
{% else %}
melcloud.set_vane_horizontal
{% endif %}
data:
entity_id: '{{ entity }}'
position: |
{% if direction == 'left' %}
{%set val= state_attr('climate.pac_salon', 'vane_horizontal') | first | int -1 %}
{{ val if val>1 else '1_left' }}
{% endif %}
It works when I test it separately, but I can't getting it work from the card.
The text was updated successfully, but these errors were encountered:
Hi,
I can't get my code working. Any help would be appreciated.
I'm trying to call a script and pass variables to it fro a button toggle_action. I don't really understand how to use the call_service option.
and the script to call is:
It works when I test it separately, but I can't getting it work from the card.
The text was updated successfully, but these errors were encountered: