home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.02k stars 2.74k forks source link

"Energy distribution today" does not update if browser tab is open from yesterday #20502

Open DanielWeigl opened 6 months ago

DanielWeigl commented 6 months ago

Checklist

Describe the issue you are experiencing

I have the "Energy distribution today" component placed on a normal dashboard and it generally works fine. But if i leave the browser tab open over the night (new day), it just shows the latest values from yesterday (ie. values from midnight), but does not update to the today values.

All other components around it update just fine.

See attached video: values update after a full page reload and then it works fine until midnight.

https://github.com/home-assistant/frontend/assets/1370302/d4e893c1-b05a-4f50-a29a-ef53d671b1ff

(Not sure if this is a frontend or backend issue - feel free to move the issue to the Core repo if applicable)

Describe the behavior you expected

The "Energy distribution today" should update to current date if its over midnight, without a full page reload

Steps to reproduce the issue

  1. Have the energy settings configured
  2. Place "Energy distribution today" on a normal dashboard
  3. See it updateing
  4. Let Browser tab open over midnight
  5. Values are frozen
  6. Refresh page
  7. New values show up and update

What version of Home Assistant Core has the issue?

2024.3.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefox/Chrome on Ubuntu, Chrome on Android

Which operating system are you using to run this browser?

Ubuntu 23.10 / Android

State of relevant entities

Frontend version 20240307.0

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

DanielWeigl commented 6 months ago

Just found this from 2021, same issue https://github.com/home-assistant/frontend/issues/10269

karwosts commented 4 months ago

Do you have an energy date selection card on your dashboard? I believe this behavior is typically handled by that card.

Hmm actually I am not sure.

karwosts commented 4 months ago

Out of curiousity, does it work correctly if you just leave the default energy dashboard open overnight (and not a custom panel?)

DanielWeigl commented 4 months ago

@karwosts sorry, did just see your question yesterday - I tried to open the /energy tab over night, and it behaves the same way. ie. it stays on yesterday, but in this context it is consistent, because all the stats, numbers and the datepicker around it are also from yesterday.

In the other case where it is embedded in a live data view, it would make sense to show the current (ie todays) values

barryvdh commented 3 months ago

I'm experiencing the same issue with type: energy-usage-graph card. It keeps showing the date it was opened.

github-actions[bot] commented 1 week 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.

tl-tasmota commented 1 week ago

The no-refresh issue with embedded energy cards still exists. (Core 2024.10.1). Please fix it.