@homenet/plugin-milight
Version:
Milight plugin for Homenet
22 lines • 664 B
JavaScript
;
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