I have a Shelly H&T sensor that has been delivering temperature to my dashboard for months. The units_of_measurement is F. Prior to 2021.9.0, my temps displayed fine (73 °F). After upgrading, I’m now seeing 179 °F. Nothing else changed.
Why is the system converting to Celsius now? Like I said, nothing else changed except I upgraded. This system has been working fine for months.
FYI, this what I get back from the developer page:
sensor.shelly_h_t_familyroom_temperature:
state: 172
state_class: measurement
unit_of_measurement: °F
friendly_name: Shelly H&T familyroom Temperature
device_class: temperature
Id check the battery, I had a similar issue of weird (high) temp reading on a battery powered sensor recently. (It was not a Shelly) … Just a thought ?
It’s most likely not a faulty sensor. If the integration is incorrectly producing a unit_of_measurement that is ºC when the result is ºF, home assistant will convert it. So either 1 of 2 things happened. OP changed the unit of measurement to ºC or the integration did. Based on OPs repsonses, I would assume that something changed in the integration and he needs to track down that change. Worse case, he can override the unit of measurement to ºF and it should not convert it anymore.
My unit is not faulty. It is reading exactly the same as it always did. I have all the values going back months. However, if you look at the graph, the value jumps from 74 to 165 immediately after I upgraded HA.
The Shelly used a USB adapter. No battery issues.
I changed nothing in my config. The only thing that changes was I upgraded Home Assistant to 2021.09.1.
All the evidence points to HA didn’t used to convert my sensor value. It would accept my value of 74 and then use the customization to add F as the unit_of_measurement. However, now it looks like HA is treating my sensor value as C and converting to F before displaying.
I did override the unit of measurement to °F. Worked fine until I upgraded.
Regarding the Shelly integration, I’m not using that. I’m using MQTT since I setup many Shellies before that integration was available. I didn’t bother converting once it became available to be consistent. However, maybe this will be a reason for me to do so.
It does, but it has always been C because the Shelly announce doesn’t include that (I pinged the developer of shelly_discovery.py. However, HA never seemed to do anything with that until now. My first guess is that HA started listening to that configuration entry with the update. My MQTT config is listed in the original question above.
I’m going to experiment with switching to the Shelly integration.
Well that’s ultimately the problem. If you can get the script to have the correct unit_of_measurement, then the problem should be fixed. My guess is that the changes with the latest energy updates cause the unit of measurement to be loaded at a different time from the customizations, which is causing issues on your system. Ultimately making your band aide (setting ºF) no longer work.
For what it’s worth, you’re not crazy and you’re not alone. I’m having the same issue with the Glances integration. As soon as I updated from 2021.8.8 to 2021.9.1 alarms started going off that my server hard drives were overheating at 78C. I eventually solved the problem by appending _f to the names of each temperature entity in the Glances integration, and then creating a template entity with the original name to convert it back to C (see below). That seemed easier than trying to track down every reference to the entities in automations, scripts, Lovelace panels, and Grafana dashboards. If it ever switches back, this should be simple to undo. Maybe this is a convenient work-around for you as well.
Having the same issue here. I use Farenheit for weather and ambient sensors, but I prefer server and 3D printer measurements in Celsius. To work around this, I used to set the unit_of_measurement to “C” without the degree symbol, causing the temperature conversion to not pick them up. After 2021.9.0, my OctoPrint MQTT sensors still read as C but they are incorrectly being converted to Farenheit. Temperature sensors started reading as 100 degrees C and triggering alerts.
I came for the same issue, temperature values from OctoPrint (mqqt via auto-discovery) since 2021.9.x branch. The temperature sensors are defined in the mqqt payload as:
availability_topic: octoprint/mqtt
payload_available: connected
payload_not_available: disconnected
name: OctoPrint Tool 0 Temperature
unique_id: 2626fde636f44a2bb46dc6dcebe7f0ad_TOOL0
state_topic: octoprint/temperature/tool0
unit_of_measurement: °C
value_template: ‘{{value_json.actual|float}}’
device:
identifiers: 2626fde636f44a2bb46dc6dcebe7f0ad
name: OctoPrint
manufacturer: Clifford Roche
model: HomeAssistant Discovery for OctoPrint
sw_version: HomeAssistant Discovery for OctoPrint 3.3.0
device_class: temperature
icon: mdi:printer-3d-nozzle
platform: mqtt