MQTT Sensor displays as a bar instead of the graph

I created a sensor and everything looks good. The only issue is that it displays history as bar instead of the graph. I see this when I click on the sensor:

But I want to see something like this:

This is how I have this sensor configured:

  - platform: mqtt
    state_topic: "WaterSoftener/Water Softener/Distance"
    name: Water Softener Level

Is there any way to do this?

Add unit_of_measurement: to the sensor. Might have to do it in your customize: section of your configuration.yaml.

1 Like

It worked, thank you very much.