1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-16 07:10:09 -07:00

271 Commits

Author SHA1 Message Date
Frederik Gladhorn
72040db991 When ModelInfo contains yet unknown values, also report the name
Then we at least have some idea (hopefully) what kind of data we are
going to ignore. See issue #62.
2020-01-13 17:19:33 +01:00
Frederik Gladhorn
cc3d60f882 Error out when language or country are invalid
Many people seem to stumble over this (I did, specifying en_US instead
of en-US for example). I don't know of any valid inputs other than two
letter combinations, but three letters could be valid.
2020-01-13 13:28:10 +01:00
Frederik Gladhorn
6461596219 Use f-strings for command line options
These are more readable than the .format strings.
2020-01-13 13:05:26 +01:00
Frederik Gladhorn
5a20b35171 Report what data is available when ModelInfo contains unexpected types
It seems that the data can cointain strings (see issue #62). Let's dump what
data we have available to be able to debug this.
2020-01-13 12:51:19 +01:00
Adrian Sampson
ad34c8b2fd
Merge pull request #73 from gladhorn/gateway
Test Gateway instantiation and remove gateway_info
2020-01-12 16:19:05 -05: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
Adrian Sampson
a72998386c Add MyPy GitHub action 2020-01-11 15:25:19 -05:00
Adrian Sampson
e4bb60d30f Merge pull request #72 from gladhorn/mypy_ci
Mypy CI
2020-01-11 15:23:32 -05:00
Adrian Sampson
9379aff62c
Merge pull request #70 from gladhorn/more_typing
More typing
2020-01-11 15:21:51 -05:00
Frederik Gladhorn
b9f7ee26ec Add mypy to CI 2020-01-11 20:27:03 +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
Frederik Gladhorn
09696d94f4 Fix type errors 2020-01-11 20:18:22 +01:00
Adrian Sampson
a0c8eceda3 Minimum Python version: 3.6 (fix #68) 2020-01-11 11:58:40 -05:00
Adrian Sampson
26fd47471b
Merge pull request #67 from gladhorn/exec_bit
Make example.py executable
2020-01-11 11:54:32 -05:00
Adrian Sampson
0e6638097d Try adding a flake8 workflow 2020-01-11 11:52:40 -05:00
Adrian Sampson
c5fb01e7cc Print error message to stderr (#66) 2020-01-11 11:43:48 -05:00
Adrian Sampson
a1cd9795c6 Wrap error message to 79 characters 2020-01-11 11:43:13 -05:00
Adrian Sampson
1655343027 Merge pull request #66 from gladhorn/invalid_command
Print error on invalid command
2020-01-11 11:42:07 -05:00
Frederik Gladhorn
a727828064 Make example.py executable
This makes it easier to run the file on unix systems.
2020-01-09 22:00:42 +01:00
Frederik Gladhorn
ff8d0ba9e0 Print error on invalid command 2020-01-09 21:58:56 +01:00
Adrian Sampson
ef59449de4
Merge pull request #65 from NorDroN/feature/refrigerator
Add refrigerator support
2019-12-28 10:09:39 -05:00
Adrian Sampson
b0b59c18dd Remove unnecessary "Boolean" enums (#65)
These enums were only used internally and never exposed to the outside
world, so they aren't really necessary---we can just do the necessary
processing internally.
2019-12-28 10:06:27 -05:00
Adrian Sampson
fc169e90e3 Docstrings & spacing for refrigerators (#65) 2019-12-28 10:02:21 -05:00
Andrey Klimov
c273a26889 Fix for flake8 2019-12-27 13:37:51 +03:00
Andrey Klimov
cfd27c0100 Merge branch 'feature/refrigerator' of https://github.com/NorDroN/wideq into feature/refrigerator
# Conflicts:
#	wideq/ac.py
2019-12-27 13:20:17 +03:00
Andrey Klimov
8eae2230f1 Remove unused import 2019-12-27 13:18:46 +03:00
Andrey Klimov
992d1d60dc
Merge branch 'master' into feature/refrigerator 2019-12-27 13:11:59 +03:00
Andrey Klimov
a54bcb04ff Add some methods (set_temp_refrigerator_c, set_temp_freezer_c)
Rename some properties
Refactoring
2019-12-27 13:10:44 +03:00
Andrey Klimov
5b1535c41c Use lookup_enum from util 2019-12-27 12:23:19 +03: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
Andrey Klimov
db7a0a59d5 Add refrigerator support 2019-12-26 10:24:31 +03:00
Adrian Sampson
07b6a1ca21 Handle NotConnectedError in example 2019-11-28 09:34:51 -05:00
Adrian Sampson
bb5aa17c0f Version bump: 1.3.0 v1.3.0 2019-11-27 11:31:09 -05:00
Adrian Sampson
37a56335dd Style fixes for #57 2019-11-09 08:27:06 -05:00
Adrian Sampson
c4447589d7 Merge pull request #57 from WonchulKang/master
Add FanMode and Fix set_on
2019-11-09 08:25:19 -05:00
Wonchul Kang
4316dad8e9
Remove Useless comment
Remove Useless comment
2019-11-08 20:36:19 +09:00
Wonchul Kang
6ed250a16e
Fix for Dual fan ac
ACOp.ALL_ON is right.

if none dual fan ac
than ALL_ON AND RIGHT_ON work is fine.

but dual fan ac
RIGHT_ON works only right fan.
2019-11-08 18:01:48 +09:00
Wonchul Kang
b31edaf46d
Add AC Fan Speed Mode For Dual AC
some lg ac model works dual wind power, left and right
in my case model name is PAC_910604_WW looks like below link

https://www.lge.co.kr/lgekor/product/aircare/air-conditioner/productDetail.do?cateId=3300&prdId=EPRD.336263
2019-11-08 17:58:37 +09:00
Fábio Souto
0d619f5060
Merge pull request #42 from ctih/patch-2
Update ac.py to support NATURE mode as a fan speed
2019-09-28 18:28:45 +01:00
Adrian Sampson
82e4a12e77 Version bump: 1.2.0 v1.2.0 2019-09-24 09:01:15 -04:00
Adrian Sampson
f33be0f99d Trailing whitespace 2019-08-24 09:26:17 -04:00
Adrian Sampson
9533bb8ec1
Merge pull request #45 from stboch/master
Adding Binary Washer/Dryer Status Update
2019-08-24 09:24:20 -04:00
stboch
4acde696e9
Update Washer to support Binary
Similar to Dryer update washer to support binary and json
2019-08-23 16:42:35 -04:00
stboch
e063259394
Fix Dryer JSON vs Binary Status
My model LG dryer uses json, moved code back to decode_monitor which supports json and binary
2019-08-23 16:40:58 -04:00
Adrian Sampson
78b48f0831 Whitespace fixes 2019-08-12 09:37:22 -04:00
Adrian Sampson
0610d0f0b7
Merge pull request #43 from dermotduffy/master
Add dishwasher device to wideq
2019-08-12 09:35:03 -04:00
Dermot Duffy
92be23f18b Add dishwasher unittest. 2019-08-11 22:05:01 -07:00