Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix history graphs not loading #1799

Merged
merged 1 commit into from
Oct 18, 2018
Merged

Fix history graphs not loading #1799

merged 1 commit into from
Oct 18, 2018

Conversation

thomasloven
Copy link
Contributor

History graphs are not displaying since update to 0.80.2.

It seems src/data/ha-state-history-data.js still uses this.language which used to be provided by the localize-mixin.

This change makes history graphs show up for me in more-info dialogs.
I haven't tested history-graphs cards etc. yet.

@ghost ghost assigned thomasloven Oct 17, 2018
@ghost ghost added the in progress label Oct 17, 2018
@thomasloven
Copy link
Contributor Author

thomasloven commented Oct 17, 2018

Resolves #1796
Resolvel home-assistant/core#17563

@thomasloven thomasloven changed the title Seems language is still used in src/data/ha-state-history-data.js Provide language from localize-mixin Oct 17, 2018
@balloob
Copy link
Member

balloob commented Oct 17, 2018

Aaah. That explains.

@@ -17,12 +17,19 @@ export default dedupingMixin(
* string should be passed in order, as follows:
* `localize(stringKey, param1Name, param1Value, param2Name, param2Value)`
*/
language: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment above is for the prop below.

Also add a comment why we have added language again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the correct fix is to just to find & replace this.language with this.hass.language

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That also solves the problem... Occurs twice in ha-state-history-data.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also makes more sense

@thomasloven thomasloven force-pushed the quickfix-history-graphs branch from ad8cd21 to 07ead6e Compare October 17, 2018 21:01
@thomasloven thomasloven changed the title Provide language from localize-mixin Fix history graphs not loading Oct 17, 2018
@liranfa86
Copy link

Can someone tell me where this file located?
What is the full path?

Thanks!

@balloob balloob merged commit 5462a71 into master Oct 18, 2018
@balloob balloob deleted the quickfix-history-graphs branch October 18, 2018 07:54
@ghost ghost removed the in progress label Oct 18, 2018
@liranfa86
Copy link

Where I can find the ha-state-history-data.js file?

Did you search the repo at all?
https://github.com/home-assistant/home-assistant-polymer/blob/master/src/data/ha-state-history-data.js

I installed the repo, Update the file as requested and update configuration.yaml like this:
frontend:
development_repo: /home/pi/home-assistant-polymer/src/data

Still don't work.

Any idea what could it be?

Thanks,
Liran.

@thomasloven
Copy link
Contributor Author

You also need to go through the whole environment setup and run the development server.
https://developers.home-assistant.io/docs/en/frontend_development.html

But if you just want it to work, there'll probably be an 0.80.3 release within an hour or two.

@Segfault198
Copy link

Segfault198 commented Oct 18, 2018

After upgrading to 0.80.3 I am still unable to load state history and history graphs are not working either. Ramps up the CPU for a while then dies out. I did manage to get it to load once but not since.
Update - if I wait long enough eventually the state history page does load. Still no graphs.

@christopheBfr
Copy link

After upgrading to 0.80.3 I am still unable to load state history and history graphs are not working either. Ramps up the CPU for a while then dies out. I did manage to get it to load once but not since.
Update - if I wait long enough eventually the state history page does load. Still no graphs.

On my side, the graph does not reload automatically in 0.80.3. I need to scroll down and up in the view or switch several times betweens my groups to force my HA to reload the graphs. After this steps, graphs are displayed and updated normally... Strange behaviour... (reproductible on both Opera/ANdroid and Firefox/Windows7

@thomasloven
Copy link
Contributor Author

That sounds like a caching problem...

@borpin
Copy link

borpin commented Oct 22, 2018

This is still an issue.

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Oct 22, 2018
@balloob
Copy link
Member

balloob commented Oct 22, 2018

No discussion in old PRs. If it's still an issue, open a new issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants