I’ve been using home assistant for a few weeks, and I’m still getting the hang of things. I have a couple temperature sensors that i’ve been tweaking settings for, and I had just changed them this morning (a few hours ago) so that the values were float(), hoping that would allow the graphs to do what I wanted. This seemed to work OK.
However, when I changed my test graph from the last 2 hours to the last 24h, both my sensors suddenly started reporting in Fahrenheit instead of Celsius - but didn’t convert all the old values. So, my graphs look like this:
The sensors themselves report in C (I checked the actual MQTT output), they’re labeled as C in the configuration, and they’ve been happily reporting C for days. Suddenly, this change, and I don’t understand it. I am in the US, and my defaults are imperial, but I certainly didn’t change this in the last few minutes. Anyone have any thoughts?
temperature units are global in home assistant. If you specify a sensor with a given unit, home assistant will convert it to the global unit in the user interface.
@riz94107 I’m curious, were you able to get your graph to display the correct temperature unit? In your graph, the values are graphed at their converted °F values, but the graph still indicates °C as the unit. I have the same behavior with a very similar setup and it’s driving me crazy because I can’t get a combined graph of all my temperatures working. The issue seems to be that some of my sensors report in °F and some report in °C. The unit_of_measurement field on each sensor is set accordingly to its native reporting unit in my sensor config, and my global unit_system is imperial.
Ahhh, good idea! I tried overriding the sensors in the customize section, which allows the sensors to merge and displays °F as the unit, but it inverts the values on the graph for those sensors to °C
I ended up just having to give up on using the native °C unit, and instead used a conversion formula in the template and set the unit_of_measurement to °F
I also had to clear the history for these sensors in my database to clear it of any references to the old units.
Now I just need to figure out why this little DHT11 temperature sensor is so inaccurate
Sorry I didn’t get back to you sooner. To me, that sounds like a bug. It should be displaying ºF when you use the ºC as the unit and your config is set to ºF. Glad you got it fixed though.
No worries! I knew I could always value template it, but I was really trying to figure out if I was doing something incorrectly or if it was indeed a bug, as that’s what I was starting to suspect because the ºF unit_of_measurement was being correctly passed on my other UI elements. Thanks again.
So this sounds like something I’ve been experiencing on and off for quite some time. I have several sensors that are all in °F, and have a unit_of_measurement of °F, yet when once in a while I delete my database and restart HA (for various testing reasons), one of the sensors shows separately in a graph labeled °C, again, even though the values are °F and the unit_of_measurement is °F. It looks like this:
It will stay this way for a while (like maybe a few days or so), then presto-magico, one day I’ll look and they’re merged together on a single °F graph! This has happened at least four or five times over the last few months.
Agreed. I just haven’t gotten around to investigating or doing anything else about it because, as I said, before long it somehow corrects itself (for me, at least) and then works just fine until the next time I blow away my database.
I understand why you’d want to convert for most sensor values, but some are meant to be reasoned over in their original units. I do all of my 3D printer stuff in °C, but track my house in °F.
Here’s where it gets messy…
I am using InfluxDB and Grafana, and once Hass makes the switch °C to °F, it starts submitting it on that measurement name to Influx.
I think the Influx component should NOT convert the values, but send them as specified in the component.
Happens to me too. Just had two of my motion sensors jump to a new graph (marked C, but still showing values in the F range: 65-75).
I just realised that these are sensors that recently became unavailable, so I had to reboot them (battery disconnect/reconnect). Oddly enough, four sensors went offline today, but two of them are now back in the F graph, while two are on the C graph.
Just because something behaves differently than you expect does not make it a bug. You’re welcome to add a feature request. But this is certainly not a bug, it’s by design.
I think this topic has talked about different but related issues. The one that seems clearly like a bug is displaying a sensor, whose unit_of_measurement is, and always has been, F, on a graph where the Y axis is labeled C, yet the values are also clearly F. And then sometime later, the same sensor jumps to a graph where the Y axis is labeled F. That is certainly a bug.