Fix what gets sent to MQTT
This commit is contained in:
parent
ab89e2e256
commit
432e2e7dfd
@ -8,7 +8,7 @@ export class State {
|
|||||||
power: (communicator) => {
|
power: (communicator) => {
|
||||||
// This *should* toggle the state, asks if state is true, if it is set it false, otherwise set it true
|
// 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;
|
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) => {
|
power: (communicator) => {
|
||||||
// This *should* toggle the state, asks if state is true, if it is set it false, otherwise set it true
|
// 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;
|
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) => {
|
power: (communicator) => {
|
||||||
// This *should* toggle the state, asks if state is true, if it is set it false, otherwise set it true
|
// 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;
|
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.`)
|
console.log(`State initialized.`)
|
||||||
|
Loading…
Reference in New Issue
Block a user