frontend icon indicating copy to clipboard operation
frontend copied to clipboard

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

Open DanielWeigl opened this issue 1 year ago • 4 comments

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.
  • [ ] I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

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 avatar Apr 12 '24 08:04 DanielWeigl

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

DanielWeigl avatar Apr 12 '24 08:04 DanielWeigl

~~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 avatar May 26 '24 13:05 karwosts

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

karwosts avatar May 26 '24 14:05 karwosts

@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

DanielWeigl avatar Jun 19 '24 06:06 DanielWeigl

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

barryvdh avatar Jul 14 '24 08:07 barryvdh

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.

github-actions[bot] avatar Oct 12 '24 08:10 github-actions[bot]

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

tl-tasmota avatar Oct 12 '24 10:10 tl-tasmota

Issue is still there in version 2025.2. Had anybody found the way to solve (except manual refresh every morning :))? Thank you.

Seriogal avatar Mar 03 '25 07:03 Seriogal

If you're having this issue, can you describe to me what kind of workflow you typically have that you notice this?

There's definitely code here that's supposed to advance the date at 1:00AM, but I wonder if the timer gets lost somehow.

  • Do you have this problem on an always on wallpanel that is continuously showing the energy page?
  • Is this on a web browser that spends a significant portion of the time minimized, or has a different tab focused?
  • Is it on a PC that spends time asleep during the night?

karwosts avatar Mar 08 '25 04:03 karwosts

I fixed two bugs in this area in #24563, I'm not 100% sure it's the same issue you're reporting here, but lets test again after next month's release.

karwosts avatar Mar 10 '25 12:03 karwosts

If you're having this issue, can you describe to me what kind of workflow you typically have that you notice this?

There's definitely code here that's supposed to advance the date at 1:00AM, but I wonder if the timer gets lost somehow.

  • Do you have this problem on an always on wallpanel that is continuously showing the energy page?
  • Is this on a web browser that spends a significant portion of the time minimized, or has a different tab focused?
  • Is it on a PC that spends time asleep during the night?

Mine is a tablet showing it on a custom page, using the widget. It's always running (mounted to the wall)

barryvdh avatar Mar 10 '25 12:03 barryvdh

If you're having this issue, can you describe to me what kind of workflow you typically have that you notice this?

There's definitely code here that's supposed to advance the date at 1:00AM, but I wonder if the timer gets lost somehow.

  • Do you have this problem on an always on wallpanel that is continuously showing the energy page?
  • Is this on a web browser that spends a significant portion of the time minimized, or has a different tab focused?
  • Is it on a PC that spends time asleep during the night?

Mine is also on a tablet on the wall which is on 24/7. It's a card with type: energy-usage-graph (core: 2025.4.2). I need to close and re-open the HA app to refesh it.

mhurk avatar Apr 15 '25 21:04 mhurk

same problem on my wall-tablet running in 24/7 mode with Companion-App. The energy-distribution card (core 2025.4.2) doesn't make the update at 1.00 (AM).
I am using

  • kiosk_mode: hide_header: true in the dashboard configuration. The dashboard is a combination of horizontal and vertical stack cards.

tl-tasmota avatar Apr 16 '25 08:04 tl-tasmota

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.

github-actions[bot] avatar Jul 15 '25 09:07 github-actions[bot]