Skip to content

Commit

Permalink
Merge pull request #70 from pschroeder89/67-cant-see-oasismist-600s
Browse files Browse the repository at this point in the history
  • Loading branch information
pschroeder89 authored Jan 18, 2024
2 parents 1aaa108 + b25b6af commit 672b066
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "Levoit Humidifiers",
"main": "dist/index.js",
"license": "Apache-2.0",
"version": "1.12.2",
"version": "1.12.3",
"private": false,
"bugs": {
"url": "https://github.com/pschroeder89/homebridge-levoit-humidifiers/issues"
Expand Down
9 changes: 5 additions & 4 deletions src/VeSyncAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default class VeSyncAccessory {
Example: The Classic300s has 9 mist levels, so this function returns [0,1,2,3,4,5,6,7,8,9].
*/
const arr = [...Array(this.device.deviceType.mistLevels + 1).keys()];

return arr;
}

Expand All @@ -67,10 +68,10 @@ export default class VeSyncAccessory {
We add 1 to warmMistLevels to account for 0 as a potential level.
Example: The LV600s has 3 warm mist levels, so this function returns [0,1,2,3].
*/
if (!this.device.deviceType.warmMistLevels) {
return [];
}
const arr = [...Array(this.device.deviceType.warmMistLevels + 1).keys()];

const arr = [
...Array((this.device.deviceType.warmMistLevels ?? 0) + 1).keys(),
];
return arr;
}

Expand Down
2 changes: 2 additions & 0 deletions src/api/deviceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ const deviceTypes: DeviceType[] = [
hasColorMode: false,
hasSleepMode: true,
hasWarmMode: true,
warmMistLevels: 3,
minHumidityLevel: 40,
maxHumidityLevel: 80,
},
Expand All @@ -327,6 +328,7 @@ const deviceTypes: DeviceType[] = [
hasColorMode: false,
hasSleepMode: true,
hasWarmMode: true,
warmMistLevels: 3,
minHumidityLevel: 40,
maxHumidityLevel: 80,
},
Expand Down

0 comments on commit 672b066

Please sign in to comment.