Skip to content

Commit

Permalink
* (Apollon77) Correctly decode encoded strings again
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 committed Jun 9, 2022
1 parent 7941702 commit 78080b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ The following endpoints (according to ...) are currently not implemented and ca
* /aircon/get_day_paower_ex

## Changelog

### __WORK IN PROGRESS__
* (Apollon77) Correctly decode encoded strings again

### 2.0.1 (2022-06-09)
* (Apollon77) export DaikinACTypes directly via DaikinAC class again as in 1.x

Expand Down
2 changes: 1 addition & 1 deletion src/DaikinDataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class DaikinDataParser {
}
}

return typeof value === 'number' ? value.toString() : value;
return typeof value === 'number' ? value.toString() : decodeURIComponent(value);
}

public static resolveBool(
Expand Down
1 change: 1 addition & 0 deletions test/testDaikinACGet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ describe('Test DaikinAC', function () {
const daikin = new DaikinAC('127.0.0.1', options, function (err) {
expect(err).toBeNull();
expect(Object.keys(daikin.currentCommonBasicInfo!).length).toEqual(25);
expect(daikin.currentCommonBasicInfo!.groupName).toEqual('Kinder'); // %4b%69%6e%64%65%72
expect(Object.keys(daikin.currentACModelInfo!).length).toEqual(7);

let cnt = 0;
Expand Down

0 comments on commit 78080b7

Please sign in to comment.