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

Add PayloadDecodeException and DeviceInfoUnavailableException #685

Merged
merged 2 commits into from
Apr 30, 2020

Conversation

rytilahti
Copy link
Owner

@rytilahti rytilahti commented Apr 23, 2020

Enables better control of error cases for downstream users:

  • PayloadDecodeException gets raised if the payload cannot be decoded even after all quirks are tried
  • DeviceInfoUnavailable gets raised by Device.info() if decoding the miIO.info payload fails

Related: home-assistant/core#34225

…bleException

Enables better control of error cases for downstream users:

* PayloadDecodeException gets raised if the payload cannot be decoded even after all quirks are tried
* DeviceInfoUnavailable gets raised by Device.info() if decoding the miIO.info payload fails

Related: home-assistant/core#34225
@rytilahti rytilahti changed the title Add PayloadDecodeException and DeviceInfoUnavailableException WIP: Add PayloadDecodeException and DeviceInfoUnavailableException Apr 23, 2020
@coveralls
Copy link

coveralls commented Apr 23, 2020

Coverage Status

Coverage increased (+0.06%) to 73.995% when pulling a912501 on feat/separete_info_exception into 881bc83 on master.

@rytilahti rytilahti changed the title WIP: Add PayloadDecodeException and DeviceInfoUnavailableException Add PayloadDecodeException and DeviceInfoUnavailableException Apr 25, 2020
@rytilahti rytilahti merged commit b368507 into master Apr 30, 2020
@rytilahti rytilahti deleted the feat/separete_info_exception branch April 30, 2020 12:38
xvlady pushed a commit to xvlady/python-miio that referenced this pull request May 9, 2021
…hti#685)

* Add two new exceptions: PayloadDecodeException and DeviceInfoUnavailableException

Enables better control of error cases for downstream users:

* PayloadDecodeException gets raised if the payload cannot be decoded even after all quirks are tried
* DeviceInfoUnavailable gets raised by Device.info() if decoding the miIO.info payload fails

Related: home-assistant/core#34225

* add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants