It appears that whilst the line graph is correct, hovering over a zero value displays the current value.



There is definitely something strange going on when the value is zero. This is how my graph looks now;



There's a fix for this in the dev branch already, will be included in the next release, I'll let you know when it's ready, thanks! 馃槂
@kloggy Should be fixed in the latest release, please confirm it's working if you can 馃憤
Sorry for the slow reply.
I still get 1% sometimes when it should be zero. I know this isn't a great response but I can happily live with this (and put it down to rounding errors). However I am more than happy to help in any way I can if you want to track down what is going on.


Today it is working perfectly. I'm happy to close this if you are.
Hey @kloggy,
Great to hear.
Is it possible that maybe the cache didn't clear properly at first after you updated to the latest version?
From my testing it seems to work as expected now as well.

I'll go ahead and close this issue, thanks for the help!
I'm still seeing this issue on the latest version...

History chart in Hassio looks fine:

Here's my history data:
Hey, would be great if you could pull the history data and send it to me.
I'm not able to reproduce this myself.
Sorry I thought I did that on my pastebin. How do I pull the history?
Sorry, was on mobile so missed that link, great, I'll take a look when I got some time.
Can you send me your card config also please.
@chriscrowe I checked the data you sent me and the information displayed in the card looks to be correct, the latest history entry is actually "0.0" as the current state indicates.
The graph is based on the moving average, so depending on card config it could take time for you to clearly see the actual dip in the graph.
Hm... So this smart plug is hooked up to a small refrigerator which cycles on and off, and in the off cycles it should be pulling nearly 0 watts. You can see 2 of the cycles in my mini-graph-card (the spikes) but it should be flat at zero between those cycles, similar to what you see in the Hassio history graph. Here's what my card config looks like:
- type: 'custom:mini-graph-card'
name: Kegerator
animate: true
icon: mdi:fridge-outline
entities:
- entity: sensor.teckin4_wattage
name: Kegerator
color: '#6DA98B' # Lime Green
hours_to_show: 2
points_per_hour: 30
line_width: 4
decimals: 0
lower_bound: 0
upper_bound: 260
show:
labels: true
Thanks, noticed another issue related to your graph though, if there is missing history data between "data points" the last known "average" value will fill the missing data points, where instead the actual last known state should be used and not the average.
Fixing this will make the graph look like this instead.

Edit: I saw your latest post, this would fix exactly this, great!
Yeah it seems to me that these plugs have some type of behavior which puts them into a sleep mode when you're not pulling a load on them, so we start getting null/missing values in the logs.
How did you make the graph in your screenshot? That does look pretty much like what I would expect.
I made some changes to the source code. I will push these changes when I get home tomorrow, and it will be available next release.
Thanks for the data!
@kalkih did this ever make its way into a release?
Nope, not yet, I'll make a new release tomorrow.
Thanks for reminding me.
Awesome thanks!
@chriscrowe New release now available, please let me know if this fixed the issues you had.