From 432e2e7dfdb77643a71104e86de698bf1e925ba2 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Thu, 15 Aug 2024 11:22:05 -0400 Subject: [PATCH] Fix what gets sent to MQTT --- src/assets/HestiaClasses.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/HestiaClasses.js b/src/assets/HestiaClasses.js index 3cd95b6..8ba7315 100644 --- a/src/assets/HestiaClasses.js +++ b/src/assets/HestiaClasses.js @@ -8,7 +8,7 @@ export class State { power: (communicator) => { // This *should* toggle the state, asks if state is true, if it is set it false, otherwise set it true this.igniter.on ? this.igniter.on = false : this.igniter.on = true; - communicator.send('hestia/status/igniter', JSON.stringify(this)); + communicator.send('hestia/status/igniter', JSON.stringify(this.igniter)); } }; @@ -19,7 +19,7 @@ export class State { power: (communicator) => { // This *should* toggle the state, asks if state is true, if it is set it false, otherwise set it true this.exhaust.on ? this.exhaust.on = false : this.exhaust.on = true; - communicator.send('hestia/status/exhaust', JSON.stringify(this)); + communicator.send('hestia/status/exhaust', JSON.stringify(this.exhaust)); } }; @@ -31,7 +31,7 @@ export class State { power: (communicator) => { // This *should* toggle the state, asks if state is true, if it is set it false, otherwise set it true this.auger.on ? this.auger.on = false : this.auger.on = true; - communicator.send('hestia/status/auger', JSON.stringify(this)); + communicator.send('hestia/status/auger', JSON.stringify(this.auger)); } }; console.log(`State initialized.`)