After the deprecation of payload_data for MQTT, we were instructed to use payload exclusively for static and template-based payloads. While testing MQTT messages with template data in Developer Tools, everything works correctly. However, when using a Lovelace button (via a tap_action calling mqtt.publish) that includes a template variable in the payload, the variable is not rendered and the literal template string is passed through instead. For example:
tap_action:
action: call-service
service: mqtt.publish
service_data:
payload: {{ states("input_boolean.studio_mode_chill") }}
topic: eventghost
will just render as:
{{ states("input_boolean.studio_mode_chill") }}
Is there a way to move the jinja2 rendering over to the payload key now that everything has been switched over?