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

Previous Accumulation sensors not updating if Octopus take more than 24hrs to publish data #810

Closed SteveJack34 closed 2 months ago

SteveJack34 commented 3 months ago

Describe the bug

The following tags: sensor.octopus_energy_gas_XXXXXXXXXX_previous_accumulative_consumption_kwh sensor.octopus_energy_electricity_XXXXXXXXXX_previous_accumulative_consumption Are not updated if it takes longer than 24hrs for octopus to publish meter readings

Reproduction steps

Wait for a day when it takes longer than 24hrs for Octopus to publish a days meter readings then observe the history of these tags.

Expected behaviour

Tags should contain the previous accumulation vales however long it takes octopus to issue

Tariff Code

AGILE

Integration Version

10.1.4

Home Assistant Version

2024.3.3

Fresh Install?

Not specified

Home Assistant Logs

NA

Confirmation

BottlecapDave commented 2 months ago

Hello and sorry for the late response.

This is currently by design as outlined in the docs and is why you can change the number of days that are monitored.

The reason for this is partially legacy and partially practical. In legacy terms, the associated cost was dependent on the rates used by the rate sensors to try and minimise data being pulled from OE. The practical reason is due to the nature of the sensor updating and it being potentially confusing about what it represents, especially when current consumption sensors are involved (where available). If the sensor updates twice in a day with different values, is this because some data was late and then the next batch was on time, or was it because the data was corrected? When the data updates, what day's worth of data does it represent as this can be confusing if it changes on a daily basis?

For these reasons, at the present time I will say this is by design. It may change in the future, but if it does this will either be in the form of a breaking change or with a new set of sensors. I may also raise a poll to gather other people's opinions.