I have two xiaomi temperature sensors. My system is configured to use imperial units. When I use an entities card to display the two temperatures, both are shown correctly in degrees F. However, when I use a history graph card, one of the temperatures is shown on a separate graph, supposedly in degrees Celsius - but the values are in Fahrenheit. Any ideas?
Unless it was you, I’ve seen the same question not so long ago.
I assume this is a bug in the graph card, and as such you should open an issue (unless one already exists)
Your device most likely outputs in ºC and home assistant converts it to ºF. However it takes a second for HA to detect that and a ºC will get into the database. Then you just need to wait for that value to get out of the history range.
It shouldn’t work that way then… But yeah “fixed” ad hoc by going into the database and deleting everything in the states table under the entity that has the unit of measurement in the attributes column as C.
It’s a chicken egg scenario. If you have a state before recorder is running, the state is already set or vice versa. Typically it doesn’t happen, however if you have a slow machine, it’s more likely to happen. Not to mention, HA is starting to move towards a system that has this defined before it happens. Baby steps. If you want it to change now, take the time to put in a PR and change it now.