How to change graph type?

I’m scratching my head at what ought to be a really simple answer. I just bought a Monoprice 4-in-1 zwave plus sensor, and when I look at the various values they’re graphed strangely. Instead of the normal line graph you’d expect to get with temperatures and the like, I get the bar graph you normally see with binary devices. HA seems to know that it’s a temperature (the units displays as °F for the temperature) so I’d expect it to show a line rather than a bar.


So how do I get these values to graph properly?

I’ve encountered similar before, I think I resolved it by changing the units

1 Like

I have solved this by using a template that converts to a float (I can’t take credit for this as I’m sure I got it off this forum somewhere!)

sensor:
  - platform: mqtt
    name: "Current Power Usage"
    state_topic: "wemosPWR/wattsInst"
    unit_of_measurement: W
    value_template: "{{ float(value) }}"

It may be necessary to purge old history data for this to work (or, wait for 24h if this is the timeframe of the plots). See Multiple devices/components, differents historic vizualisation for further information.

2 Likes

Logged in just to say, “Thank You”. I was pulling my hair out why one sensor (of course, after I tweaked with its “unit_of_measurement”) wouldn’t go back to being the old bar graph etc.
After searching quite some time, came across your post. Deleted the DB, CTRL+F5, and it’s back to being the way it was supposed to be.

Exactly the same like Joedoe: I created an account just to say “Thank you !”
The “delete tables” for the corresponding problematic entities was the most precious hint in last days ! :slight_smile: