1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-06-01 23:10:14 -07:00

14 Commits

Author SHA1 Message Date
Jason Swails
e7b5a7d28b Address review comments 2020-04-07 22:05:06 -04:00
Jason Swails
95e64dec1a Fix flake8 complaints 2020-04-07 08:07:42 -04:00
Jason Swails
6446595548 Improve retry logic 2020-04-05 10:11:12 -04:00
Frederik Gladhorn
919139d9e8 Add logging
Instead of using print, let's use Python's logging framework. That
allows switching verbosity easily and filtering out unwanted messages.
Some of the setup code is inspired by what Home Assistant does.
2020-01-31 22:01:17 +01:00
Frederik Gladhorn
d35c3ff817 Add (de)serialize methods to Gateway and Auth
This makes the parts belonging to the class more local and encapsulated.
This will make adding API v2 easier.
2020-01-22 15:34:19 +01:00
Frederik Gladhorn
655bace1ba Test Gateway instantiation and remove gateway_info
The function just forwarded to do one API call, do the same call inline
and improve testing at the same time by checking that 'Gateway' gets
instantiated correctly.
2020-01-12 21:42:10 +01:00
Frederik Gladhorn
2641e44f3e Improve type information
Most parameters to Client's __init__ are optional.
This matters when adding more types other places.
2020-01-12 11:19:31 +01:00
Frederik Gladhorn
e98d2a18d1 Add type information
This helps later refactoring.
Use mypy to check types.
2020-01-11 20:18:22 +01:00
Adrian Sampson
47765d21e4 Preserve codes for named errors
This simplifies the definition of error classes *and* preserves more
information about the underlying message from the API.
2019-12-26 13:35:53 -05:00
Adrian Sampson
dbab3fd1fe Do not crash on failed speaker volume retrieval
Fixes #63.
2019-12-26 13:33:25 -05:00
Adrian Sampson
3ac6cab147 Refactor API error handling
Use a declarative style for mapping errors. Also add a new one for an
"invalid request" message.
2019-12-26 13:13:14 -05:00
Adrian Sampson
9896067952 Expand comment for #25 2019-07-04 10:53:06 -04:00
José Albornoz
4eb4ba1975 Return None on monitoring when there's no code yet 2019-07-03 23:00:35 -04:00
Adrian Sampson
22cde97fab Reorgnize package into 3 modules
As discussed here:
https://github.com/sampsyo/wideq/pull/24#issuecomment-506997116

Closes #24.
2019-06-30 14:08:42 -04:00