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 ?