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

Allow some failures before setting Xiaomi Miio MIOT air purifiers unavailable #50755

Merged
merged 3 commits into from
May 17, 2021
Merged

Conversation

bieniu
Copy link
Member

@bieniu bieniu commented May 17, 2021

Breaking change

Proposed change

MIOT air purifiers sometimes return {'code': -9999, 'message': 'user ack timeout'} for no reason when retrieving state. This PR adds mechanism to not mark the entity as unavailable after the first status update failure.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

This pull request needs to be manually signed off by @home-assistant/core before it can get merged.
(message by ReviewEnforcer)

@probot-home-assistant
Copy link

Hey there @rytilahti, @syssi, @starkillerOG, mind taking a look at this pull request as its been labeled with an integration (xiaomi_miio) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@bieniu bieniu changed the title Try again to update the state of MIOT air purifiers in Xiaomi Miio integration Don't mark an MIOT air purifiers entity as unavailable after the first status update failure in Xiaomi Miio integration May 17, 2021
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@MartinHjelmare MartinHjelmare changed the title Don't mark an MIOT air purifiers entity as unavailable after the first status update failure in Xiaomi Miio integration Allow some failures before setting Xiaomi Miio MIOT air purifiers unavailable May 17, 2021
@frenck frenck merged commit 9755908 into home-assistant:dev May 17, 2021
@bieniu bieniu deleted the miio-retry branch May 17, 2021 12:13
tkdrob pushed a commit to tkdrob/core that referenced this pull request May 17, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2021
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.

Miio Xiaomi Air Purifier availability blinking ({'code': -9999, 'message': 'user ack timeout'})
6 participants