Display of data history

Hi,
I was wondering if it is possible to choose how history data is displayed ?
For instance, I have a sensor giving only integer numbers, but are dislayed as a timeline, with is not very logical… Is there a way to force it to plot data in a graph

?
Thanks,

It’s probably missing a unit_of_measurement. Can you post the YAML that defines this sensor?

Yes indeed, there is no unit, since it is counter. What would you suggest ?

- platform: template
  sensors:
    xiaomi_thermometre_nombre_points: 
      value_template: "{{ state_attr('sensor.mi_t_4c65a8dd140c', 'last median') }}"
      friendly_name: Nombre Points sur minute écoulée

Let’s say something like “ppm” (points per minute), or something more appropriate in your language. Whatever you pick, add a line like this (then restart):

      unit_of_measurement: ppm

Once the sensor has a unit of measurement it should display on a graph. Be forewarned, though, that for a while it will probably show as a combination of a line (with the old values) and a graph (with the new values.) At some point it should show strictly as a graph.

2 Likes

Thanks for your quick help !

1 Like

How’s that…you fixed my problem when I wasn’t even trying to get it solved!
Just stumbled on this post…Cheers!

1 Like