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

Xiaomi Vacuum: keep error state active after erroring #16562

Merged
merged 2 commits into from
Oct 10, 2018

Conversation

rytilahti
Copy link
Member

Description:

The vacuum returns back to an idle state after erroring, making it seem that there's no error anymore.
This will change this behaviour to keep the error state active.
A new python-miio release (with rytilahti/python-miio#379) is required for this to work.

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.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

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

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

@@ -179,6 +179,9 @@ def name(self):
def state(self):
"""Return the status of the vacuum cleaner."""
if self.vacuum_state is not None:
# We can have an error even when the state code does not indicate it (anymore).

Choose a reason for hiding this comment

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

line too long (91 > 79 characters)

@rytilahti rytilahti changed the title WIP: Check for got_error to keep consistent error reporting WIP: Xiaomi Vacuum: keep error state active after erroring Sep 11, 2018
@@ -179,6 +179,10 @@ def name(self):
def state(self):
"""Return the status of the vacuum cleaner."""
if self.vacuum_state is not None:
# The vacuum reverts back to an idle state after erroring out.
# We want to keep returning an error until it has been cleared.

Choose a reason for hiding this comment

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

trailing whitespace

@rytilahti
Copy link
Member Author

@syssi just to ping you that this can be merged after the python-miio gets bumped!

@balloob
Copy link
Member

balloob commented Oct 1, 2018

It's still WIP. Let's close this and you can open new PR once lib has been updated?

@rytilahti
Copy link
Member Author

I'd prefer to keep it open (if not just as a reminder), but if you wish we can close this and I'll simply re-open when we have done a new release?

@balloob
Copy link
Member

balloob commented Oct 8, 2018

Please reopen after release. We already have enough open PRs 👍

@rytilahti rytilahti mentioned this pull request Oct 8, 2018
8 tasks
@rytilahti rytilahti changed the title WIP: Xiaomi Vacuum: keep error state active after erroring Xiaomi Vacuum: keep error state active after erroring Oct 8, 2018
@rytilahti
Copy link
Member Author

I just created a PR to bump to the newest python-miio release (released last weekend).

@rytilahti rytilahti reopened this Oct 8, 2018
@balloob balloob merged commit 78c3874 into home-assistant:dev Oct 10, 2018
@ghost ghost removed the in progress label Oct 10, 2018
@balloob balloob mentioned this pull request Oct 26, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
@rytilahti rytilahti deleted the xiaomi_vac_error_handling branch October 22, 2019 19:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants