How to use service_template with tap_action?

You can’t template in lovelace fields. Make a script and call the script instead.

script:
  set_hz_ankleidezimmer_group_temp:
    sequence:
    - service: climate.set_temperature
      data_template:
        entity_id: climate.hz_ankleidezimmer_group
        temperature: >
          {{ state_attr('climate.hz_ankleidezimmer_group', 'temperature') | float + 0.5 }}

Then in lovelace

type: button
tap_action:
  action: call-service
  service: script.set_hz_ankleidezimmer_group_temp
hold_action:
  action: more-info
show_icon: true
show_name: true
entity: climate.hz_ankleidezimmer_group
1 Like