Hallo zusammen,
dies ist meine erste Frage hier im Forum und ich hoffe Ihr könnt mir helfen. Ich habe Zuhause einige Automatisierungen mit Shelly programmiert die jetzt nach und nach in Home-Assistant integriert werden sollen. Das Resultat soll nachher so aussehen, dass ich ein “Hand/Auto” Button habe und daneben einen Button, der nur bedienbar seien soll, wenn der erste Button auf Hand steht. Ansonsten ist der 2. Button gesperrt, was er dann auch anzeigen soll. Hier mein programmierversuch mit der Mushroom-Template -Card. Es geht um die “tap_action”

type: custom:mushroom-template-card
primary: Zirkp-Hand-Start/Stop-Zykl.
secondary: >-
{% if is_state('switch.zirkulationspumpe', 'off') and
is_state('input_boolean.automatik_zirkp', 'on') %}
Gesperrt
{% elif is_state('switch.zirkulationspumpe', 'on') %}
Zyklus beenden
{% else %}
Zyklus starten
{% endif %}
icon: >-
{% if is_state('input_boolean.automatik_zirkp', 'on') %}
mdi:close-circle-outline
{% elif is_state('switch.zirkulationspumpe', 'on') and
is_state('input_boolean.automatik_zirkp', 'off') %}
mdi:timer-pause-outline
{% else %}
mdi:timer-play-outline
{% endif %}
icon_color: >-
{% if is_state('input_boolean.automatik_zirkp', 'on') %}
red
{% elif is_state('switch.zirkulationspumpe', 'on') and
is_state('input_boolean.automatik_zirkp', 'off') %}
yellow
{% else %}
green
{% endif %}
tap_action: >-
{% if is_state('input_boolean.automatik_zirkp', 'on') %}
action: none
{% elif is_state('input_boolean.automatik_zirkp', 'off') %}
action: toggle
{% endif %}
hold_action:
action: none
double_tap_action:
action: more-info
entity: input_boolean.zirkp_hand_start_stop_zyklus
Als Fehlermeldung kommt:
Visueller Editor wird für diese Konfiguration nicht unterstützt:
- At path: tap_action – Expected an object, but received: “{% if is_state(‘input_boolean.automatik_zirkp’, ‘on’) %} action: none {% elif is_state(‘input_boolean.automatik_zirkp’, ‘off’) %} action: toggle {% endif %}”
Du kannst deine Konfiguration weiterhin in YAML bearbeiten.
Das habe ich auch versucht:
tap_action:
action: >-
{% if is_state('input_boolean.automatik_zirkp', 'on') %}
none
{% elif is_state('input_boolean.automatik_zirkp', 'off') %}
toggle
{% endif %}
Dann kommt diese Fehlermeldung:
Konfigurationsfehler erkannt:
missed comma between flow collection entries (32:4)
29 | {% endif %}
30 | tap_action:
31 | action: >-
32 | {% if is_state('input_boolean.au …
---------^
33 | none
34 | {% elif is_state('input_boolean. …
Vielleicht habt Ihr eine Idee?!
Vielen Dank im voraus