frontend icon indicating copy to clipboard operation
frontend copied to clipboard

history-graph: wrong auto-refresh

Open ildar170975 opened this issue 3 years 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.

Describe the issue you are experiencing

The issue is similar to the closed issue https://github.com/home-assistant/frontend/issues/12859. ~In 2022.7 the initial issue seems to be solved - but only for sensors with UoM. The current issue is for sensors w/o UoM.~ Update: the very same behaviour is with sensors with UoM.

To demonstrate the issue, I am using some input_boolean helper.

Let's assume that the helper's value is ON.

Set the helper's value to OFF. The graph is refreshed, the OFF value is displayed on the graph (thin red line). image

Wait for a few minutes - and the graph is NOT refreshed anymore.

Set the helper's value to ON. The graph is updated, but the ON value is not displayed on the graph. image

Wait for a few minutes - and the graph is NOT refreshed.

Press F5 to reload the page - the graph is refreshed: image

Describe the behavior you expected

A graph is updated after a reasonable delay after state's change.

Steps to reproduce the issue

  1. Create an input_boolean helper.
  2. Create a card with this input_boolean helper:
type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: input_boolean.flag
        secondary_info: last-changed
  - type: history-graph
    entities:
      - input_boolean.flag
    hours_to_show: 1
    refresh_interval: 0
  - type: logbook
    entities:
      - input_boolean.flag
    hours_to_show: 1
  1. Change a value of the input_boolean helper.
  2. See if the graph is updated. ...

What version of Home Assistant Core has the issue?

2022.7.0

What was the last working version of Home Assistant Core?

2022.5

In which browser are you experiencing the issue with?

Chrome 103.0.5060.114

Which operating system are you using to run this browser?

Win10x64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

ildar170975 avatar Jul 06 '22 22:07 ildar170975

I believe it's on a 10 second refresh but I'll check later. It's not as instant as the logbook

zsarnett avatar Jul 06 '22 23:07 zsarnett

10 second refresh

It is not refreshed within minutes.

Probably the 1st screenshot (thin red line) occurs after ~10 seconds after setting the helper to OFF.

ildar170975 avatar Jul 06 '22 23:07 ildar170975

Same issue here. Using a switch state. Before refreshing browser: Screenshot 2022-07-07 223242

After refreshing browser: Screenshot 2022-07-07 223304

Browser: Chrome 103.0.5060.66 running on Win10 21H2 HA: 2022.07.0 Frontend: 20220706.0

melfar87 avatar Jul 08 '22 02:07 melfar87

Any updates on this? I recently made a coffee roaster and have a Lovelace view with relevant data in a graph, but it never updates unless I manually refresh the page. Happy to provide any additional info if it's helpful.

brooksben11 avatar Sep 23 '22 16:09 brooksben11

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 Dec 23 '22 16:12 github-actions[bot]

Still having this issue of the graph not updating without doing a forced refresh of the entire webpage. I am using the most recent version of HA.

brooksben11 avatar Dec 23 '22 16:12 brooksben11

How about sensor graphs not being updated in history - would that fall into this case, or should I open a separate issue for that (there have been at least two in the past, all closed, but history graphs for sensors still do not auto update at all)

darmach avatar Jan 17 '23 10:01 darmach

@darmach That's the exact issue I've been having, but at least when I first ran across it this seemed the most appropriate of existing issues. Let me know if you open a new issue and I'll follow it as well.

brooksben11 avatar Jan 17 '23 14:01 brooksben11

The issue still persists at least for input_boolean: https://github.com/home-assistant/frontend/issues/15498

ildar170975 avatar Feb 19 '23 16:02 ildar170975