Increment Thermostat Temperature

Could someone help fixing the “expected float for dictionary value” error? I spent more than one hour looking for answers in the forum and didn’t get solution yet. So thought of getting some help here.

type: custom:mushroom-entity-card
entity: climate.thermostat_downstairs_thermostat
icon: mdi:plus
primary_info: none
secondary_info: none
tap_action:
  action: call-service
  service: climate.set_temperature
  target:
    entity_id: climate.thermostat_downstairs_thermostat
  data:
    temperature: "{{ state_attr('climate.thermostat_downstairs_thermostat', 'temperature') + 1 }}"

I also tried below syntax with no luck.

"{{ state_attr('climate.thermostat_downstairs_thermostat', 'temperature') | float(0) + 1 }}"

"{{ state_attr('climate.thermostat_downstairs_thermostat', 'temperature') | float(0) + 1 | float(0) }}"

"{{ state_attr('climate.thermostat_downstairs_thermostat', 'temperature') | float(0) + 1.0 }}"

image

Any help would be greatly appreciated.

Thanks,
Anand

Templating is not supported in most card actions, even in many custom cards that support templates elsewhere.

Put your templated service calls in a script and call the script from your card action.

Thanks. It worked.