UNPKG

homebridge-levoit-humidifiers

Version:
24 lines 874 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const VeSyncFan_1 = require("../api/VeSyncFan"); const characteristic = { get: async function () { await this.device.updateInfo(); return this.device.isOn ? this.device.mistLevel : 0; }, set: async function (value) { if (value == 0) { await this.device.setPower(false); } else { if (!this.device.deviceType.hasWarmMode || this.device.model.includes('LUH-O601S') // This model has a Warm Mode, but it doesn't support changing mist levels in sleep mode ) { await this.device.changeMode(VeSyncFan_1.Mode.Manual); } await this.device.changeMistLevel(Number(value)); } }, }; exports.default = characteristic; //# sourceMappingURL=MistLevel.js.map