universam1 / iSpindel

electronic Hydrometer
http://www.ispindel.de
Other
827 stars 324 forks source link

History of tilt entity in HA not shown as line graph #588

Closed WesleyE closed 2 years ago

WesleyE commented 2 years ago

I'm submitting a ...

Did you follow the general troubleshooting steps first:

Report

The configuration (unit_of_measurement) for the tilt is not supplied by the HA MQTT integration, causing the history of the tilt entity to be shown as a state change instead of a line graph: image

Any unrecognized unit_of_measurement like ° will make HA show the line graph. Not sending it shows the data points as in the screenshot. See the docs here.

Your Environment

universam1 commented 2 years ago

It looks like an HA bug to me. Can you reason why this is an iSpindel issue instead?

WesleyE commented 2 years ago

Its the way HA functions. Without a unit it treats the value as a state (open, opening, closed, closing) and does not show the line graph. When adding a unit, it is treated like a continuous unit that they are able to graph. There are special units (like degrees C) that they graph in a special way, anything that is not in their special list will just receive the normal line graph treatment. Hope this helps!

universam1 commented 2 years ago

Thanks makes sense

vytux-com commented 2 years ago

Its the way HA functions. Without a unit it treats the value as a state (open, opening, closed, closing) and does not show the line graph. When adding a unit, it is treated like a continuous unit that they are able to graph. There are special units (like degrees C) that they graph in a special way, anything that is not in their special list will just receive the normal line graph treatment. Hope this helps!

How are you defining the sensor in HA?

Because you should be able to set the unit_of_mesurment in the config without it having to be passed from the source for example my definition of CPU temp for one of my servers. image

WesleyE commented 2 years ago

In this case its configured by the iSpindel itself using the HA MQTT Auto Discovery topics.