UNPKG

@homenet/plugin-milight

Version:
22 lines 664 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Milight = require('node-milight-promise').MilightController; const commands = require('node-milight-promise').commands2; class MilightBridge { constructor(id, host) { this.id = id; this.bridge = new Milight({ ip: host, delayBetweenCommands: 75, commandRepeat: 2 }); } turnOn(zone) { this.bridge.sendCommands(commands.white.on(zone)); } turnOff(zone) { this.bridge.sendCommands(commands.white.off(zone)); } } exports.MilightBridge = MilightBridge; //# sourceMappingURL=bridge.js.map