From 9409fc7ddbb49e268f2b9c9c671fdea0f227c949 Mon Sep 17 00:00:00 2001 From: Ryan Steele Date: Sun, 26 May 2024 14:57:45 -0700 Subject: [PATCH] Fix logic in getState with invert_status true --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6f21eb0..a0ce379 100644 --- a/index.js +++ b/index.js @@ -84,7 +84,7 @@ class CommandAccessoryPlugin { execSync(this.config.check_status, { timeout: timeout }); this.currentState = !this.config.invert_status; } catch (error) { - this.currentState = false; + this.currentState = this.config.invert_status; } this.log.debug(`Returning: ${this.currentState}`);