How To Present AQI Device History as a Graph Instead of the Color-bar?

Hi,

I have several BME680-based sensors, spread around the house. These are sending, among other data, AQI data. I receive data via MQTT and I declared them as

device_class: aqi

When I click those entities in the Lovelace UI, I get something like this:
image

(I know, right now the AQI is bad and I plan to open the windows, but let’s get back to our topic :smiley: )
Notice the colored History bar. That is not useful in my opinion, as one is unable to understand how that sensors’ data changes in time. I’d rather use something similar to the temperature History, like below:

Any suggestions about how to change the appearance of my sensor in the front-end so I get a graph instead of the color-bar?

you need to add a unit of measurement to the entity.

see here

Good tip, thanks for it! I’ve entered “units” as “unit of measurement” and now it produces a graph under the color-bar.

1 Like