Skip to content

History order bugfix and opt-in option#11686

Merged
balloob merged 3 commits into
home-assistant:devfrom
rwa:history-order-bugfix
Jan 16, 2018
Merged

History order bugfix and opt-in option#11686
balloob merged 3 commits into
home-assistant:devfrom
rwa:history-order-bugfix

Conversation

@rwa
Copy link
Copy Markdown
Contributor

@rwa rwa commented Jan 16, 2018

Description:

This fix does two things:

  1. Makes the new feature of ordering sensors in the history view optional and opt-in.
  2. Should also fix the bug which was in the original implementation. But since the original feature had issues, I'm being conservative by making it opt-in for now.

Related issue (if applicable): fixes #11671

If someone wants to use the new history ordering feature, they would add the configuration parameter as shown below:

Example entry for configuration.yaml (if applicable):

history:
    use_include_order: True
...

Checklist:

  • The code change is tested and works locally.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

Comment thread homeassistant/components/history.py Outdated
break
sorted_result.extend(result)
result = sorted_result

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

Comment thread homeassistant/components/history.py Outdated

hass.http.register_view(HistoryPeriodView(filters))
use_include_order = config[DOMAIN].get(CONF_ORDER)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

@arsaboo
Copy link
Copy Markdown
Contributor

arsaboo commented Jan 16, 2018

Just tried it in custom_components and it fixes the history bug 👍

@balloob balloob added this to the 0.61.1 milestone Jan 16, 2018
@balloob balloob merged commit 94950cc into home-assistant:dev Jan 16, 2018
balloob pushed a commit that referenced this pull request Jan 16, 2018
* make history view re-ordering optional and opt-in, also fix type bug

* use python false for default value

* whitespace cleanup
@balloob balloob mentioned this pull request Jan 16, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
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.

History component is not working

6 participants