Currently, service calls enforce having a dict, whose values can be templates.
Now that we have typed templates, it should be possible to return a dict from a template for the whole data as well, e.g.
- service: climate.set_temperature
data: >
{% if trigger.to_state.state == "on" %}
{"hvac_mode": "heat", "temperature": 12 }
{% else %}
{"hvac_mode": "auto" }
{% endif %}