Skip to content

Add PayloadDecodeException and DeviceInfoUnavailableException#685

Merged
rytilahti merged 2 commits intomasterfrom
feat/separete_info_exception
Apr 30, 2020
Merged

Add PayloadDecodeException and DeviceInfoUnavailableException#685
rytilahti merged 2 commits intomasterfrom
feat/separete_info_exception

Conversation

@rytilahti
Copy link
Copy Markdown
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
Copy Markdown

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