Tap action in IF ELSE

                    tap_action:
                      {% if is_state("media_player.lg_webos_smart_tv", 'on') %}
                        action: call-service
                        service: script.turn_on
                        service_data:
                          entity_id: script.lg_vrt
                      {% else %}
                        action: call-service
                        service: script.turn_on
                        service_data:
                          entity_id: script.lg_turnof                      
                      {% endif %}

What am I doing wrong here ?

edit: Apply condition to a tap action card - #2 by Miczach

Build a script with the conditions and actions. Call the script from your tap action.

Or you can use this:
:memo: 100% Templatable Lovelace Configurations - Share your Projects! / Dashboards & Frontend - Home Assistant Community (home-assistant.io)

1 Like

Already found it. Edited my post. Thanks anyway

1 Like