From 7ec92f28cba5ba08692c46bb4c25a773dc0c2535 Mon Sep 17 00:00:00 2001 From: watsonb8 Date: Fri, 3 Jan 2020 16:14:12 -0500 Subject: [PATCH] Fixed bug where state wasn't being remembered --- src/Accessories/DeviceButton.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Accessories/DeviceButton.ts b/src/Accessories/DeviceButton.ts index ce5f5e0..ba7e284 100644 --- a/src/Accessories/DeviceButton.ts +++ b/src/Accessories/DeviceButton.ts @@ -109,7 +109,7 @@ export class DeviceButton implements IAccessory { //change state if stateful if (this._buttonInfo.IsStateful) { - this._buttonState != this._buttonState + this._buttonState = !this._buttonState } else { this._switchService.getCharacteristic(Characteristic.On).updateValue(false); return callback(new Error("Normal Response"));