home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.99k stars 29.64k forks source link

"Return to grid" cost(compensation) is lost for the time HA is not running #96026

Open Gitsarry opened 1 year ago

Gitsarry commented 1 year ago

The problem

Describe the issue you are experiencing When HA is not running (HA computer shutdown), in this example between 07:00 (7 am) and 19:00 (7 pm), and in this time produced energy (kWh) is returned to the grid, the energy counter for the "return to grid" is correct when starting HA again, but the "return to grid" energy cost (negative value, =compensation) is not counted for the time HA was shutdown, it is permanently lost. E.g. here a screen shot of a day where I had supplied 2.49 kWh to the grid while HA was not running. I have a constant "return to grid" compensation of 0.082 €/kWh. Dashboard says the money compensation for that would be -€0.00 while correctly it would be -2.49 * 0.082 = -0.20 € screenshot2 The loss of the compensation value is permanent, meaning it persists in the later week/month/year statistics and cumulates for every time HA is not running while you return energy to grid. See also this bug report with some more screenshots https://community.home-assistant.io/t/bug-in-energy-dashboard-kwh-supply-compensation-0-00-when-ha-was-shutdown-some-hours-of-day/586947

Describe the behavior you expected The "return to grid" cost should be the product of the "return to grid" energy value multiplied with the "return to grid" compensation value for the time HA was not running. Calculation is correct when HA is running. Here an example of another day where it is correct -0.6 * 0.082 = -0.05 screenshot2 Steps to reproduce the issue Produce electric energy [kWh] and return it to the grid While producing and returning to grid, shut down HA After some hours producing and returning to grid while HA was shutdown, start HA again What version of Home Assistant Core has the issue? 2023.6.3

What version of Home Assistant Core has the issue?

System information Version core-2023.5.2 Installation Type Home Assistant OS Development false Supervisor true Docker true User root Virtual Environment false Python Version 3.10.11 Operating System Family Linux Operating System Version 6.1.34 CPU Architecture x86_64 Timezone Europe/Berlin Configuration Directory /config Home Assistant Cloud Logged In false Reach Certificate Server ok Reach Authentication Server ok Reach Home Assistant Cloud ok Home Assistant Supervisor Host Operating System Home Assistant OS 10.3 Update Channel stable Supervisor Version supervisor-2023.07.1 Agent Version 1.5.1

What was the last working version of Home Assistant Core?

not known

What type of installation are you running?

Home Assistant OS

Integration causing the issue

energy

Link to integration documentation on our website

Energy Dashboard

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

This is a clone bug report from the frontend repo, as recommended inr https://github.com/home-assistant/frontend/issues/17132#issuecomment-1624250517

issue-triage-workflows[bot] commented 10 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Gitsarry commented 10 months ago

The issue persists with the newest HA with all current updates.

The issue is severe because the cost data gets corrupted more and more over time.

I had another data loss this week because after one HA update the ZHA data was not tracked anymore. So I ended up with reverting to a two week old full backup. (I learned that in the future I will always make a full backup before cumulative update, and always restart HA completely after cumulative update but this is off topic here)

And because of that, I lost now additional two weeks of cost data.

issue-triage-workflows[bot] commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Gitsarry commented 7 months ago

This issue is severe because the cost data gets corrupted more and more over time.

The issue persists with the newest HA with all current updates.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Gitsarry commented 4 months ago

This issue is severe because the cost data gets corrupted more and more over time.

The issue persists with the newest HA with all current updates.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Gitsarry commented 1 month ago

This issue is severe because the cost data gets corrupted more and more over time.