Hi, can’t seem to get this right. This works
tap_action:
action: call-service
service: mqtt.publish
data:
topic: command/set/audio
payload_template: |-
{ "area": "living", "action": "mute",
"state": {% if is_state("input_boolean.living_mute", "on") %} true {% else %} false {% endif %}
}
retain: false
target: {}
but using payload_templates breaks it. The expression doesn’t get evaluated and is sent as an entire string. Trying to migrate away from payload_template as it is being deprecated.
Thanks for your help in advance.