[SOLVED] Ariston integration V3 returns temperature as string, can't convert to number

Hi,

I’m trying to get the current temperature of my ariston water heater using a template sensor.

If I just set

value_template: "{{ state_attr('water_heater.boiler', 'current_temperature') }}"

I get the Value “58.0”, but it’s a string.

As soon as I add unit_of_measurement: "°C" I get a warning that the value is a string, but a numeric value is expected. Makes sense, but how can I convert it?

I tried

value_template: "{{ state_attr('water_heater.boiler', 'current_temperature') | float }}"
and
value_template: "{{ state_attr('water_heater.boiler', 'current_temperature') | int}}"

which gives me the errors
...it has the non-numeric value: '"58.0"' (<class 'str'>)
and
...it has the non-numeric value: '"58"' (<class 'str'>)

So it seems to convert the value but does not change the type?

I’m using the most current verion of ha with the Arison integration V3:

Any pointers what I’m missing?

Thanks!

Update: Found the error!
It was the " at the beginning and end of the template string!