Home Assistant - Sense Integration Bug

I upgraded to HA Core-2021.11.2 on Friday.

Since that time, HA reports my previous day total energy use as regenerated and sent back to the grid in the 12AM hour of the next day.

I don’t have Solar.

I don’t send anything back to the Grid.

Real-time Use reported correctly.

Anyone else having this issue and what can be done about it as it’s screwing up my data :man_shrugging:t3:





Not sure what to tell you. I’m on HA Core-2021.11.2, and have been there for a bit. I didn’t encounter a change when I did upgrade, but I have solar. Here’s how mine is wired up in the Energy Config - to Daily numbers.

Here’s the result (and yes, I charged the EV last night)

As @DevOpsTodd is aware, problem first started that 12a-1a hour was not showing ANY energy use in HA every night starting with Core-2021.11.1

Update to Core-2021.11.2 converted 12a-1a as sending all previous day back to grid.

1 Like

True that I’m aware of it, but I don’t know why you have an issue and Kevin and I do not. I do not have return to grid but I do have a generator. So the commonality that Kevin and I share is that we have the daily production populated. There’s no reason why you shouldn’t be able to populate daily production as well. Since it will be 0 there should be no negative effect.

Also, it should be noted that we are using an unofficial method of obtaining this data from Sense and the issue is completely third party related.


I would note that under Grid Consumption, @kevin1 is “Daily From Grid”, @DevOpsTodd sys “Daily Usage” and mine says “Daily Energy Usage”.

Do not know if it makes any difference but I do not find those exact selections available in my drop downs.

Also wondering what other options you both have selected under that?

We have the same entity. It’s just labeled differently. The label doesn’t have any affect.

Kevin is using from grid because he has solar. We don’t have that value for non solar setups.

Daily From Grid is a Sense Solar output as is Daily to Grid, along with Solar Production

1 Like

Installed Core-2021.11.4 earlier tonight.

Same issue at 12am - 1am again.

@kevin1 can you check the energy usage and hover over the bar on the furthest left to see the time that you have for that reporting. I’m not getting any reporting from 12-1am and it looks like you aren’t either by your screen shots. Just want to confirm.

I think there’s a bug with HA and daylight savings where 12-1am = 1-2am and so on. Everything is 1 hour forward.

image

I’m traveling right now and don’t have HA enabled for remote. Won’t be able to snap another shot until Sunday. Sorry. I did wonder about DST when I saw the issue.

1 Like

Where’s Waldo?

1 Like

@Beachcomber , @DevOpsTodd , finally had time to look at the Home Assistant energy graph issue and have two answers.

  1. Yes, I’m seeing the same issue - 12am-1am is missing (it is really zero)

  1. And I know why it is happening. Not a a DST issue. If I look at the underlying HA data via a query, it becomes obvious. HA is using the DAILY from grid, to grid and net production. Unfortunately, the HA Sense integration only produces only 1 value per hour representing the energy usage over the previous hour, EXCEPT for midnight / 12am. There, the HA integration zeros the midnight reading to start the new day. What we really need is the HA integration to produce that last value for the day and subsequent apps need to assume zero is the starting point for the new day.

4 Likes

So how is this explained :man_shrugging:t3:

Also the bad data in the 12am started right after the 2021.11.2 core update as I originally stated up top. Yes, it’s replacing no data with bad data, but it’s screwed the rest of the day for me as well.

Until the underlying problem is fixed, I’ve used the Yearly values in the HA Energy configuration and that made everything work. All hourly, daily values are now spot on and no midnightish shenanigans. I’m guessing that once a year, it will mess up but for now (or until a fix), I’ll take that.

1 Like

Thanks @jeffml,
If the same factors are at play, we’ll all have one missing hour at the start of every year.

@Beachcomber, you might want to try to query your HA database for those two entity values to see what’s lurking in there. But that would either require an SQL app or the InfluxDb plugin to reveal. All of my HA energy waveforms going back to Sept 7, when I first configured in the daily energies are 0 for that first hour - no big negative hours.

But I’m going to reconfigure today to the fix @jeffml is suggesting.

@Beachcomber,
Switching to Yearly HA data stream fixed the issue for me.

2 Likes

@jeffml,
I finally figured out the full issue here. Home Assistant energy module expects the typical dumbest output of a smart meter which is a single, or multiple, cumulative energy usage / production data stream vs. time that monotonically increases forever. Sense integration doesn’t do the forever thing. The best it does is a year, as you suggested.

This solution doesn’t work.

It’s shifting every hour in HA +60 minutes.

Like it’s on DST.


Even your hours are being shifted if you look at your post closely.


1 Like