Fix what gets sent to MQTT

This commit is contained in:
Skylar Grant 2024-08-15 11:22:05 -04:00
parent ab89e2e256
commit 432e2e7dfd

View File

@ -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.`)