Successful multi hub

This commit is contained in:
watsonb8
2020-01-24 21:31:43 -05:00
parent ec0c857c97
commit 97c0f625db
4 changed files with 106 additions and 72 deletions

View File

@ -113,11 +113,11 @@ export class DeviceButton implements IAccessory {
//change state if stateful
if (this._buttonInfo.IsStateful && this._buttonState != newState) {
this._buttonState = newState
await this._dataProvider.sendCommand(this._deviceCommand);
//TODO await this._dataProvider.sendCommand(this._deviceCommand);
} else if (!this._buttonInfo.IsStateful) {
//Send the number of configured key presses
for (let i = 0; i < this._buttonInfo.NumberOfKeyPresses; i++) {
await this._dataProvider.sendCommand(this._deviceCommand);
//TODO await this._dataProvider.sendCommand(this._deviceCommand);
}
this._switchService.getCharacteristic(Characteristic.On).updateValue(false);
return callback(new Error("Normal Response"));