cflurin / homebridge-mqtt

Homebridge-mqtt is a Plugin for Homebridge.
Apache License 2.0
229 stars 38 forks source link

Bug in accessory.js save_and_setValue #27

Closed zieherf closed 7 years ago

zieherf commented 7 years ago

@cflurin I upgraded to version 0.3 and removed/added all my accessories. My accessories are confirming homebridge/from/set by sending a homebridge/to/set once the accessory reported that the new value was set. This worked for 0.2.4 but cause an infinite loop with homebride-mqtt sending a homebridge/from/set after the homebridge/to/set message and so on.

The change was caused by a bug in accessory.js. Line 313 should read var context = this.i_label[service_name][c]; instead of var context = this.i_label[c];

cflurin commented 7 years ago

Thanks for reporting the bug. Last commit fixes this issue.