Core: Graphs only update after state change

Created on 10 Mar 2017  路  5Comments  路  Source: home-assistant/core

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.39.2 (0.39.3 only contains a discovery fix and I have discovery disabled)

Python release (python3 --version):
3.4.2

Component/platform:
History card in States UI

Description of problem:
The graph in the history card of an entity is only updated when a state change occurs. This means the graph stops at the time of the last state change, and doesn't show the duration of the current state.

Expected:
The graph to be up-to-date as it was in version 0.38.x and older.

Problem-relevant configuration.yaml entries and steps to reproduce:
Here's an example of what a given history card looked like at 0:14 AM (my cursor was hovering over the very end of the graph to capture this):

schermafbeelding 2017-03-10 om 00 14 22

I then switched the lightstrip off (and on again) and revisited the same history card at 0:15 AM (notice the updated end time and duration):

schermafbeelding 2017-03-10 om 00 15 03

Additional info:

  • Forcing a refresh in the browser doesn't force the graph to be updated, only the state change does.
  • I can reproduce this behaviour both when accessing Home Assistant through my nginx reverse proxy and when acccessing it using the host ip address.
  • This behaviour is not entity or component specific, although entities with frequent updates (e.g. a luminance sensor) make it harder/impossible to notice.
  • The History UI (through the sidebar) seems to be working correctly.

Most helpful comment

I discovered another issue which is probably related to this one: if an entity has not had a state change since the last time Home Assistant was started, the graph will not be drawn but an error will be shown instead. The error is shown after the normal loading time and also differs between browsers.

This is the error in Firefox:

schermafbeelding 2017-03-16 om 01 40 00

And this is the error in Chrome for the same entity:

schermafbeelding 2017-03-16 om 01 40 33

To get rid of the error, you need to trigger a state change and refresh the page. After that, the history graph will be drawn.

All 5 comments

I updated to 0.40 today. Unfortunately, the above hasn't changed.

I discovered another issue which is probably related to this one: if an entity has not had a state change since the last time Home Assistant was started, the graph will not be drawn but an error will be shown instead. The error is shown after the normal loading time and also differs between browsers.

This is the error in Firefox:

schermafbeelding 2017-03-16 om 01 40 00

And this is the error in Chrome for the same entity:

schermafbeelding 2017-03-16 om 01 40 33

To get rid of the error, you need to trigger a state change and refresh the page. After that, the history graph will be drawn.

Same in 0.41

I'm not sure but I think that this issue is related with this https://github.com/home-assistant/home-assistant-polymer/issues/240 The thermostats graphs are drawn in the opposite direction because the timeline does not move.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Konstigt picture Konstigt  路  3Comments

flsabourin picture flsabourin  路  3Comments

piitaya picture piitaya  路  3Comments

kirichkov picture kirichkov  路  3Comments

coolriku picture coolriku  路  3Comments