History Graph Card plots a staircase for sensor and a spline for input_number

you need to define a unit of measurement (in customize I think) for the graph to show up.

The graph looks this way because the “unit of measurement” is unknown. Simple to fix using HA frontend. Go to the bottom of the “Configuration” page and then “Customization”. Find your sensor and change the “unit of measurement” to, say “People”.

Or use the older method with this added to your .yaml code:

sensor.people_at_home:
  friendly_name: People at Home
  icon: mdi:person-supervisor
  unit_of_measurement: People

squirtbrnr, Graham, thanks for the explanation. I really did not expect the unit of measurement to have any impact aside from actually denoting it in the UI. Regardless, it’s working perfectly now! Still I think it would be nice to be able to configure how to graph a value in some other way instead of making parallel input_number/template sensors, but for now it definitely gets the job done :slight_smile:
afbeelding

I am also missing the step/staircase option a lot.
Templating ist a quirky workaround to generete another sensor with addidtional date I do not need.

In the picture you see the target and the measured temperature. The target ist updated only on rare occasions, which is just fine. With this data the spline interpolation is pretty useless. Steps/staircase representation would reduce the need for redundant data.

grafik

cheers

1 Like

Just a heads up, there is an open feature request (from myself) to at least allow some customizability for display.
Especially since switching from stepped to linear is 1 parameter in chartjs!

I am now at 2022.8.5
Both sensor and input number are plotted as a staircase.
This workaround to plot with spline now longer works.

Hi,

I use some AI on the Edge ESP32-CAM based digitizers for analog water and power meters. These send data points with current value and the rate derived from the change between two previous measurements and the time between them.

The rate data is plotted by HA as a staircase plot with the step drawn as vertical line at the new value’s position (I guess “post” is the drawing style term).
For rate data calculated by the device it would reflect the data visually much better if a the vertical line (the change) would be drawn at the previous data point’s position (“pre”).

I udnerstand, that the ebst “post”/“pre” plot behaviour is dependent on the sensor.

An easy to configure plot style per sensor would be great. Maybe even have line connections instead of staricase plots or only data points?