homebridge-xiaomi-power-strip-fixed
Advanced tools
Comparing version 2.1.19 to 2.1.20
13
index.js
@@ -26,4 +26,3 @@ var miio = require('miio'); | ||
.on('get',this.getPowerState.bind(this)) | ||
.on('set',this.setPowerState.bind(this)) | ||
.on('off',this.setPowerState.bind(this)); | ||
.on('set',this.setPowerState.bind(this)); | ||
@@ -35,5 +34,5 @@ this.services.push(this.switchService); | ||
this.serviceInfo | ||
.setCharacteristic(Characteristic.Manufacturer, 'Xiaomi') | ||
.setCharacteristic(Characteristic.Model, 'Power-Strip') | ||
.setCharacteristic(Characteristic.SerialNumber, '62810821');; | ||
.setCharacteristic(Characteristic.Manufacturer, 'Xiaomi'); | ||
.setCharacteristic(Characteristic.Model, 'Power-Strip'); | ||
.setCharacteristic(Characteristic.SerialNumber, '62810821'); | ||
@@ -55,3 +54,3 @@ this.services.push(this.serviceInfo); | ||
accessory.device = device; | ||
this.getPowerState(); | ||
device.power(); | ||
}, | ||
@@ -84,3 +83,3 @@ | ||
this.device.setPower(state) | ||
.then(result => { this.log.info('Power is now', result); this.getPowerState(); callback(); }) | ||
.then(result => { this.log.info('Power is now', result); return callback(null, result) }) | ||
.catch(callback); | ||
@@ -87,0 +86,0 @@ }, |
{ | ||
"name": "homebridge-xiaomi-power-strip-fixed", | ||
"version": "2.1.19", | ||
"version": "2.1.20", | ||
"description": "Xiaomi Mi Power Strip plugin for Homebridge with working power management", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5020
68