I just updated homeassistant to 2025.4.4 and I got a warning as per the subject, saying that the manually configured sensor wouldn’t work after 2027 something (I inadvertently clicked on ignore and I no longer see the message so it is from memory).
I’ve searched and everywhere it says that ºC is a valid unit for temperature.
This is the configuration of the sensor in configuration.yaml
Your MQTT Sensor configuration is not using the correct degree symbol.
This is from your configuration.
unit_of_measurement: "ºC"
This is the correct degree symbol.
unit_of_measurement: "°C"
It’s smaller than the one used in your example but may be difficult to see the difference when viewed in a forum post. I suggest you copy the two examples into a text editor and then the difference will be more noticeable.
Here’s a screenshot from a text editor where the difference is more noticeable.
Remove the incorrect, larger degree symbol from your configuration and copy-paste the correct, smaller degree symbol from my example.
Its a U+000BA masculine ordinal indicator. You can tell its lunchtime. Not by the symbol but that I looked it up. Now ive looked up the degree C symbol its U+2103 in unicode.
Interesting that it appears with an underbar (underscore?) when displayed on your system. As mentioned above, nothing I tried displays it like that.
It presents a bit of a support headache when the symbol’s appearance can vary to such an extent. My phone browser renders the two symbols so that they’re virtually indistinguishable whereas yours adds something that isn’t even seen in my browser. What a mess; no wonder the OP is perplexed by it.
Sorry for not replying earlier, the forum didn’t notify me of the new messages, I saw them just now.
In fact the problem was a different, albeit apparently the same, symbol. I used my keyboard to enter it and it turns out it was the wrong one
$ python
Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ord('º')
186
>>> ord('°')
176
>>> ord('º')
186
>>>
The first one is from my configuration file, the second from the error message in the log and the third one is the key º on the keyboard (which, unsurprisingly, it’s the same as the one I put in the configuration).
It turns out the key on the keyboard is not the symbol for degrees but for the “masculine ordinal indicator” Degree symbol - Wikipedia
You just have to love Unicode and long for the strong stuff its designers smoked
and that was my fault actually (I had to enable it in the account configuration)