homebridge-syntex-webhooks
Advanced tools
Comparing version 2.0.7-b8 to 2.0.7-b9
22
index.js
@@ -516,3 +516,3 @@ var request = require('request'); | ||
//this.service.getCharacteristic(Characteristic.On).on('get', this.getState.bind(this)).on('set', this.setState.bind(this)); | ||
this.service.getCharacteristic(Characteristic.On).on('get', this.getState.bind(this)).on('set', this.setState.bind(this)); | ||
//this.service.addCharacteristic(new Characteristic.Brightness()).on('get', this.getBrightness.bind(this)).on('set', this.setBrightness.bind(this)); | ||
@@ -523,2 +523,22 @@ this.service.addCharacteristic(new Characteristic.Hue()).on('get', this.getHue.bind(this))/*.on('set', this.setHue.bind(this))*/; | ||
SynTexWebHookStripeRGBAccessory.prototype.getState = function(callback) | ||
{ | ||
var device = { | ||
mac: this.mac, | ||
name: this.name | ||
}; | ||
var name = this.name; | ||
var mac = this.mac; | ||
readDevice(device).then(function(res) { | ||
state = (res == 'true' || res); | ||
log('\x1b[36m%s\x1b[0m', "[READ]", "HomeKit Status für '" + name + "' ist '" + state + "'"); | ||
callback(null, state); | ||
}); | ||
}; | ||
SynTexWebHookStripeRGBAccessory.prototype.getHue = function(callback) | ||
@@ -525,0 +545,0 @@ { |
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "2.0.7-b8", | ||
"version": "2.0.7-b9", | ||
"description": "A webhook plugin for HTTP devices", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
26448
526