BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
535 stars 49 forks source link

Intelligent peak and off-peak accumulative consumptions appear negative for first hour #795

Closed legsak1mbo closed 2 months ago

legsak1mbo commented 3 months ago

Describe the bug

I wanted to get a breakdown of my peak and off-peak usage and costs on Intelligent so I set the appropriate accumulative sensors (and their costs) in my energy dashboard. Since doing this the first hour has shown as (very) negative. It's almost as if something somewhere is thinking that we're in BST rather GMT and subtracting a chunk of yesterday's use for the first hour. All other hours display fine. See screenshots attached.

Screenshot 2024-03-14 at 08 25 37 Screenshot 2024-03-14 at 08 25 51

Reproduction steps

Enable the peak and off-peak accumulative sensors and their costs and configure them as grid consumption sources in the energy dashboard.

Expected behaviour

The graphs should provide an accurate breakdown of peak and off-peak costs.

Tariff Code

INTELLI-VAR-22-10-14

Integration Version

10.1.4

Home Assistant Version

2024.3.0

Fresh Install?

Not specified

Home Assistant Logs

I've enabled debug logging and can update with logs when available.

Confirmation

legsak1mbo commented 3 months ago

Got another large negative value this morning:-

Screenshot 2024-03-15 at 09 29 52

Debug logs attached.

octopus_ha.log

Happy to provide any other info as necessary.

BottlecapDave commented 2 months ago

Hello and sorry for the late response.

I'll try and take a look when I get a chance.

BottlecapDave commented 2 months ago

I seem to have the same issue on my instance. After a little bit of investigation, it looks like the last_reset timestamp isn't being updated (mine is stuck in february), despite the entity being configured in exactly the same way as the standard consumption sensor. The only difference is the peak/off peak entities are not enabled by default. Trying to track down why it's stuck and not updating on my instance. Do your entities have the same issue? This can be confirmed by looking at the attributes in the developer tools.

legsak1mbo commented 2 months ago

Yes indeed, both the Peak & Off Peak Current Accumulative Consumption entities are showing as last_reset 2024-03-12T00:00:00+00:00 (which is, I assume, when I enabled them).

BottlecapDave commented 2 months ago

This should be fixed as part of v10.3.0

legsak1mbo commented 1 month ago

Sorry to be the bearer of bad news but this happened again last night. I'd plugged in earlier than usual and got some extra charge slots - not sure if that's relevant. Let me know what you need from me (screenshot attached)...

Screenshot 2024-05-07 at 09 57 37