Skip to content

Display history charts up to end of selected time#254

Merged
balloob merged 2 commits into
home-assistant:masterfrom
emlove:history-chart-end-time
Apr 4, 2017
Merged

Display history charts up to end of selected time#254
balloob merged 2 commits into
home-assistant:masterfrom
emlove:history-chart-end-time

Conversation

@emlove
Copy link
Copy Markdown
Contributor

@emlove emlove commented Apr 3, 2017

This PR changes the rendering of history charts to extend all the way to the requested end time. (See example below for illustration.) These screenshots were both taken at approx 16:50. Note from the scales at the bottom that the new scale extends all the way to the current time. This becomes very important for some entities that don't change state very frequently, since the new state might only occupy a sliver of the chart even if it has been in that state for a substantial amount of time.

Also, in order to accommodate this, I had to do some refactoring of ha-state-history-data. We were previously passing in a filterValue, which was a query string that got passed directly to /history/period/. I refactored this so that we're instead passing the values natively, and generate the string only once we need to.

Fixes home-assistant/core#6508

Old:
Old

New:
New

@mention-bot
Copy link
Copy Markdown

@armills, thanks for your PR! By analyzing the history of the files in this pull request, we identified @andrey-git, @balloob and @justweb1 to be potential reviewers.

@fanaticDavid
Copy link
Copy Markdown
Contributor

fanaticDavid commented Apr 3, 2017

Looks like a fix for home-assistant/core#6508 which I opened some time ago? Graphs used to work this way.

@emlove
Copy link
Copy Markdown
Contributor Author

emlove commented Apr 4, 2017

Yes, it should fix that issue. I'm not sure where the bug was introduced though, or if an alternate implementation is preferred.

@balloob
Copy link
Copy Markdown
Member

balloob commented Apr 4, 2017

Looks good! 🐬

@balloob balloob merged commit abbdc6f into home-assistant:master Apr 4, 2017
andrey-git added a commit to andrey-git/home-assistant-polymer that referenced this pull request Apr 4, 2017
* Allow empty state name. (home-assistant#247)

* Allow badge size control via variables. (home-assistant#246)

* Allow using icon/name for default_view. Add hover-title whn using an icon. (home-assistant#244)

* Don't propagate event from cover controls. (home-assistant#248)

* Fix Safari maps issue

* added missing executor (home-assistant#250)

Executing a JS script fails on some systems (good thing I replaced my default program for JS on windows!). It's bad practice.

* upgrade paper-slider and remove min-max hack (home-assistant#252)

* Treat default_view as special only with view:true (home-assistant#251)

* Add web-component-tester tests (home-assistant#255)

* Use travis.yml from polymer

* Update .travis.yml

* Try wct tests

* Encrypt Sauce env

* More test config

* Update2

* try to remove souce_connect

* Try another config

* More browsers

* Clean tabs, test shadow dom.

* Display history charts up to end of selected time (home-assistant#254)

* Display history charts up to end time

* Back into JS world
@emlove emlove deleted the history-chart-end-time branch April 4, 2017 12:30
@andrey-git andrey-git mentioned this pull request Apr 14, 2017
tkdrob pushed a commit to tkdrob/frontend that referenced this pull request Apr 20, 2021
…istant#254)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 2022
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.

5 participants