Convert a text "value" into an actual value

Hello All,

I’m making my first steps into the world of Home assistant and did some cool stuff already, however I’m enountering a challenge.

I have have a sensor (originating from Nibe Pi by mqtt) which is a dimensionless number, called degree minutes.
This is the only sensor from the nibe Pi which has a point instead of a comma.
I’m dutch so the comma means decimal by my locale settings.

With the help of the helper I already converted the . in the text to a ,


{{ states(‘sensor.nibe_degree_minutes_16_bit’) | replace(“.”, “,”,1) }}
If I make any other changes in device class etc the value is not displayed anymore.

However this tekst “value” is still text instead of a actual value.
Resulting in incorrect history data

does anyone knows how to fix this?