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 trend binary sensor and tests #22686

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Conversation

awarecan
Copy link
Contributor

@awarecan awarecan commented Apr 3, 2019

Description:

Trend binary sensor has the capability to calculate the state base one trend line. It is time-sensitive calculation, so the sample time should be the update_time of the entity's state, not the time trend sensor received sample.

Also, the test also time-sensitive, it may become flaky since everytime I run I got different numbers. This PR changed test to control the timing. Now I get more stable result.

One flaky test result I spotted at here: https://circleci.com/gh/home-assistant/home-assistant/3728#tests/containers/1

Related issue (if applicable): fixes #

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@ghost ghost assigned awarecan Apr 3, 2019
@ghost ghost added the in progress label Apr 3, 2019
@balloob
Copy link
Member

balloob commented Apr 3, 2019

Flaky test is homekit controller, fixed in another branch.

@balloob balloob merged commit b4fc1d7 into home-assistant:dev Apr 3, 2019
@ghost ghost removed the in progress label Apr 3, 2019
unibeck pushed a commit to unibeck/home-assistant that referenced this pull request Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants