mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Fixed status update
This commit is contained in:
@@ -115,6 +115,11 @@ FibaroHC2Platform.prototype = {
|
||||
return services;
|
||||
},
|
||||
command: function(c,value, that) {
|
||||
if (that.doNotSet != undefined && that.doNotSet == true) {
|
||||
that.doNotSet = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var url = "http://"+this.host+"/api/devices/"+that.id+"/action/"+c;
|
||||
var body = value != undefined ? JSON.stringify({
|
||||
"args": [
|
||||
@@ -502,6 +507,7 @@ function startPollingUpdate( platform )
|
||||
for (i=0;i<updateSubscriptions.length; i++) {
|
||||
var subscription = updateSubscriptions[i];
|
||||
if (subscription.id == s.id) {
|
||||
subscription.accessory.doNotSet = true;
|
||||
if ((subscription.onOff && typeof(value) == "boolean") || !subscription.onOff)
|
||||
subscription.characteristic.updateValue(value, null);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user