-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- dedicated submodule for exceptions (still exposed at module level through `aioairq.__all__`) - `core.DeviceInfo`: - room_type -> suggested_area to further consistency with home assistant - all fields, except for `id` are optional (much like with `homeassistant.helpers.entity.DeviceInfo`) - `core.AirQ.get`: - limited to an explicit set of queries / webserver routes (namely `AirQ._supported_routes = ["log", "config", "data", "average", "ping"]). Other routes return objects with different structure, which aren't consistent with the current decoding steps - Error handling for JSONDecodeError and KeyError, which ought not to happen with the aforementioned routes (added as a precaution against unexpected firmware behaviour) - `encrypt.AESCipher`: - failed authentication is now inferred as close to the point of failure as possible. The success or failure of the authentication is based on the ability to decode the response from the device, thus the error `InvalidAuth` is raised in `AESCipher.decode`
- Loading branch information
1 parent
9f95608
commit c3ec577
Showing
4 changed files
with
72 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class InvalidAuth(Exception): | ||
"""Error to indicate an authentication failure.""" | ||
|
||
|
||
class InvalidInput(Exception): | ||
"""Error to indicate the device ID / IP is invalid.""" | ||
|
||
|
||
class InvalidAirQResponse(Exception): | ||
"""Error to indicate incorrect / unexpected response from the device""" |