-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combined cleaninfo+waterinfo #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Implement method for duplicate code
Hi @dbochicchio I thinkk we have to rename the "CleanReportDetails" event because some models don't have a mopping system. Which name do you prefer?
|
Do we still need the "Waterinfo" event? I think we can remove it ... this.emit("WaterInfo", {
'enabled': this.bot.waterboxInfo,
'level': this.bot.waterLevel
}); |
I also would like to convert {
"status": "idle",
"waterInfo": {
"enabled": false,
"level": 4
}
} |
I want to use the event name {
"cleanStatus": "idle",
"waterInfo": {
"enabled": false,
"level": 4
}
} emitMoppingSystemReport() {
if (this.bot.hasMoppingSystem() && this.bot.waterLevel && (this.bot.waterboxInfo !== null)) {
this.emit("MoppingSystemInfo", {
'cleanStatus': this.bot.cleanReport,
'waterInfo': {
'enabled': Boolean(Number(this.bot.waterboxInfo)),
'level': this.bot.waterLevel
}
});
}
} |
@mrbungle64 it's ok for me. I'm using this event to understand when it's starting and if it's mopping or just cleaning, by looking at enabled. You're the maintainer, so it's up to you, I'm good with anything you'll pick ;) |
Hey @mrbungle64 I've added a new event to combine cleaning status with waterinfo. This makes easier in my MQTT bridge to get the real status (ie: mopping or cleaning) in a central and unique place.