Sense data resets at 7pm

Hi, I have a Sense energy monitor connected to HASS with the standard integration. I’d like to start using it more for analytics since Sense’s built in stuff is very high level. But the most important one, Daily Usage, seems to reset every day at 7pm, and then not register more usage overnight until the next morning, which certainly isn’t the case. I don’t see any settings I’m missing, and I’ve tried reloading the integration.

Screen Shot 2020-10-22 at 10.43.06 AM

Any other suggestions for things to try?

You need to use the current energy usage sensor instead.
sensor.energy_usage
Energy
What I see you using is the ‘total for the day’; this will keep adding to the previous value and resets each day.

Oh sorry that’s what I’m trying to track – total for the day. I have a similar chart using current energy_usage.

I am hoping to make a chart that has the past 7 days of energy usage, and then maybe push that data out to another DB for long term storage/analysis alongside other historical data

I do the same. I send the data to influxDB then to Grafana; there is a good guide on that here somewhere. In Grafana you can use the energy_usage that I have above and set a time frame via dynamic drop-down and add a min/max/avg/total for that time frame. I don’t have Grafana currently accessible outside my home network directly since I use grafana_renderer to send the graphs as pictures back to home assistant; so I can’t immediately send you a picture of that.

To clarify, I have more in Grafana then I send back to HA.

You can get this data directly from Sense without any template:
E2

Got it. Yeah that’s kind of my long term plan.

For now, I have a different sensor with an aggregate function on it by date (code below), and I was hoping to do the same thing here.

But I kind of don’t trust this Sense data in HA if it is resetting to 0 at 7pm and not registering any usage for a bunch of hours past that…

type: 'custom:mini-graph-card'
name: Boiler Run Time by Day
bar_spacing: 2
decimals: 1
group_by: date
height: 200
hours_to_show: 168
icon: 'mdi:flash'
unit: h
entities:
  - entity: sensor.boiler_on_time_since_10pm
    name: Peak
    aggregate_func: max
    color: orange
show:
  labels: false
  graph: bar
  hour24: true
  extrema: false
  average: false

Here is an example of what I was talking about in Grafana, I remembered that I had posted this. This is air quality but same point for the bottom graph.

Of course, I cut out the part on the side that I was talking about.

No thoughts on why my Sense reading goes to 0 at 7pm? Presumably yours doesn’t do that?

And does yours stay totally flat all night at 0?

I think you might have the wrong time zone set up:
sense

Mine resets at Midnight.

Figure it out?

I haven’t…Sense has my timezone (ET) set correctly. Sense support gives the standard “not our integration” response.

I guess my next step is to use the API directly and see if it is giving the right numbers? Try to pin the issue on Sense or isolate it as a problem with the HA integration?

Ok so I’ve been playing around with this wrapper for the Sense API https://github.com/scottbonline/sense

And I’m now noticing that after 7pm I can’t get to the Trends data in the Sense app, nor can I use the API directly to get data, nor obviously is HA getting data.

I wonder if I’m getting rate-limited by the Sense API? Looks like the update data calls time out.

I did the default Sense integration, and I just looked there is no apparent way to change the duration between calls.

I have had the app open for hours before and it updates every few seconds; so how many devices do you have it running on?

I currently have it on two phones and then the Home Assistant and also I use the web interface and I don’t ever recall having an issue.

Maybe it is reporting an extreme number of items, I have 112 entries for Sense currently.

This link came from another post in a sense thread on this site:
https://status.sense.com/

I am seeing the same thing, with the Daily Production and Usage values resetting to 0 at 7:00 pm CST instead of midnight. I confirmed that HA has the correct timezone defined as well as the Sense device itself. Watching daily usage in the Sense app shows the Day views correctly, it is only the HA sensors that are resetting before the day is over in CST, instead resetting at 0:00 GMT.

Any hints?

I believe I eventually found that the OS time zone was set to something else, in my case on a raspberry pi

1 Like

@mike3 As a matter of fact it was! It defaulted to BST. I used raspi-config, Localization to change it. Hopefully that takes care of it.

Appreciate the comment!