-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
enhancementNew feature or requestNew feature or request
Description
one thing to add is a way to control the cleaning mode: vacuum/mop and the power level associated with it. My first idea would be to add a fan mode which can be controlled but this is tricky as the user needs to remember which percent of the fan corresponds to which cleaning mode. Another idea would be to have switches for cleaning and mopping. Still you somehow need to control the power levels for vacuuming...
Mopping is tricky as it is missing from valetudo. It's an additional mode during which the vacuum moves slower.
I modified valetudo as follows:
var fanspeeds = { 38: "Quiet", 60: "Balanced", 75: "Turbo", 100: "Max", 105: "Mop" };
`function handleFanspeedButton() {
window.clearTimeout(currentRefreshTimer);
ons.openActionSheet({
title: 'Select power mode',
cancelable: true,
buttons: [
'Quiet',
'Balanced',
'Turbo',
'Max',
'Mop',
{
label: 'Cancel',
icon: 'md-close'
}
]
}).then(function (index) {
var level;
switch (index) {
case 0:
level = 38;
break;
case 1:
level = 60;
break;
case 2:
level = 75;
break;
case 3:
level = 100;
break;
case 4:
level = 105;
break;
}
if (level) {
loadingBarHome.setAttribute("indeterminate", "indeterminate");
fanspeedButton.setAttribute("disabled", "disabled");
fn.requestWithPayload("api/fanspeed", JSON.stringify({ speed: level }), "PUT", function (err, res) {
if (err) {
fanspeedButton.removeAttribute("disabled");
loadingBarHome.removeAttribute("indeterminate");
ons.notification.toast(err, { buttonLabel: 'Dismiss', timeout: 1500 })
} else {
window.clearTimeout(currentRefreshTimer);
window.setTimeout(function () {
updateHomePage();
}, 150);
}
})
} else {
window.setTimeout(function () {
updateHomePage();
}, 3000);
}
});
}`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request