From 004d04a3454c11360a183a6f58c8ddaee943354d Mon Sep 17 00:00:00 2001 From: Paul Schroeder Date: Wed, 17 Jan 2024 21:36:40 -0700 Subject: [PATCH 1/2] 67: add oasismist 600s kus model --- src/VeSyncAccessory.ts | 9 +++++---- src/api/deviceTypes.ts | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/VeSyncAccessory.ts b/src/VeSyncAccessory.ts index 8cfd6d4..841ffa2 100644 --- a/src/VeSyncAccessory.ts +++ b/src/VeSyncAccessory.ts @@ -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; } @@ -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; } diff --git a/src/api/deviceTypes.ts b/src/api/deviceTypes.ts index b1df119..1670156 100644 --- a/src/api/deviceTypes.ts +++ b/src/api/deviceTypes.ts @@ -315,6 +315,7 @@ const deviceTypes: DeviceType[] = [ hasColorMode: false, hasSleepMode: true, hasWarmMode: true, + warmMistLevels: 3, minHumidityLevel: 40, maxHumidityLevel: 80, }, @@ -327,6 +328,7 @@ const deviceTypes: DeviceType[] = [ hasColorMode: false, hasSleepMode: true, hasWarmMode: true, + warmMistLevels: 3, minHumidityLevel: 40, maxHumidityLevel: 80, }, From b25b6af16c310fd37474bb7ec373f516296cc175 Mon Sep 17 00:00:00 2001 From: Paul Schroeder Date: Wed, 17 Jan 2024 21:36:40 -0700 Subject: [PATCH 2/2] 67: add oasismist 600s kus model --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 037a458..096de54 100644 --- a/package.json +++ b/package.json @@ -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"