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

fix: "Enum not found" #9

Merged
merged 37 commits into from
Mar 4, 2020
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
30b0a66
Add refrigerator support
aklimov-work Jan 10, 2020
b4d8eb0
Add method getDevice
aklimov-work Jan 10, 2020
e042f63
Add dishwasher
aklimov-work Jan 16, 2020
02b14a1
Refactoring
aklimov-work Jan 17, 2020
d6a5533
Add dryer
aklimov-work Jan 17, 2020
f42e353
Add washer
aklimov-work Jan 17, 2020
0384215
Fixed import paths in devices/ac
squareplanetdesign Jan 19, 2020
7c17fce
Fix Celsius to Fahrenheit convertion table
squareplanetdesign Jan 19, 2020
9c7e823
Fixed swing mode so they are mapped to the right enum.
squareplanetdesign Jan 19, 2020
5802e8b
Add the ACDevice to the client loader
squareplanetdesign Jan 19, 2020
9b5ef76
Small fix
aklimov-work Jan 20, 2020
a4e027a
Merge branch 'master' into test_ac_support
NorDroN Jan 20, 2020
2557f02
Update ac.ts
NorDroN Jan 20, 2020
eeba217
Update client.ts
NorDroN Jan 20, 2020
b72ea1f
All parameters to lowercase
aklimov-work Jan 20, 2020
4279866
Add multi language support
aklimov-work Jan 20, 2020
f984901
Fix for comments
aklimov-work Jan 20, 2020
e951c89
Add localization support
aklimov-work Jan 20, 2020
31f05bd
Merge branch 'master' into master
aklimov-work Jan 20, 2020
38146bd
Merge pull request #1 from squareplanetdesign/test_ac_support
NorDroN Jan 20, 2020
3a17e39
Update README.md
aklimov-work Jan 20, 2020
26f9953
Merge branch 'master' of https://github.com/NorDroN/wideq-js
aklimov-work Jan 20, 2020
7bba976
Add tslint
aklimov-work Jan 21, 2020
ef85b7d
Refactoring
aklimov-work Jan 21, 2020
fd2f548
Some fixes for tslint
aklimov-work Jan 21, 2020
486c373
Add devices to export
aklimov-work Jan 22, 2020
e041552
Fix "[DEP0091] DeprecationWarning: crypto.DEFAULT_ENCODING is depreca…
aklimov-work Jan 22, 2020
75139c6
Add more options for RefrigeratorDevice
aklimov-work Jan 24, 2020
f489d8e
Small fix for washer
aklimov-work Jan 24, 2020
77e80c0
Add parameter --token into cli
aklimov-work Jan 24, 2020
cfebc98
Add method setOn
aklimov-work Jan 27, 2020
d8988c4
Add OnOffEnum
aklimov-work Jan 28, 2020
d3036f9
Update README.md
NorDroN Jan 30, 2020
8b05df5
Fix for lookupReference
aklimov-work Jan 31, 2020
2017c86
Merge branch 'master' of https://github.com/NorDroN/wideq-js
aklimov-work Jan 31, 2020
71d2b8a
Merge pull request #2 from ssut/master
NorDroN Feb 4, 2020
7834e85
Fix for lookupEnum
aklimov-work Mar 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export function asTime(hoursKey: string, minutesKey: string, data: any) {
* @returns The enum value.
*/
export function lookupEnum(attr: string, data: any, device: Device) {
if (!(attr in data)) {
return null;
}
return device.model.enumName(attr, data[attr]);
}

Expand Down