UNPKG

@elshaer/homebridge-lg-thinq

Version:

A Homebridge plugin for controlling/monitoring LG ThinQ device via LG ThinQ platform.

28 lines 1.12 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const WasherDryer_1 = __importDefault(require("../../devices/WasherDryer")); class Washer extends WasherDryer_1.default { constructor(platform, accessory) { super(platform, accessory); this.platform = platform; this.accessory = accessory; const { Characteristic, } = this.platform; this.serviceWasherDryer.getCharacteristic(Characteristic.Active).setProps({ perms: [ "pr" /* Perms.PAIRED_READ */, "ev" /* Perms.NOTIFY */, "pw" /* Perms.PAIRED_WRITE */, ], }); } async setActive(value) { var _a; const device = this.accessory.context.device; await ((_a = this.platform.ThinQ) === null || _a === void 0 ? void 0 : _a.thinq1DeviceControl(device, 'Power', value ? 'On' : 'Off')); } } exports.default = Washer; //# sourceMappingURL=Washer.js.map