Skip to content

Commit

Permalink
fix(vendor.roborock): Fix MOP_DOCK_MOP_CLEANING_FREQUENCY quirk
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed May 14, 2023
1 parent de9a085 commit 15a6baa
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions backend/lib/robots/roborock/RoborockQuirkFactory.js
Expand Up @@ -116,7 +116,7 @@ class RoborockQuirkFactory {
getter: async() => {
const res = await this.robot.sendCommand("get_smart_wash_params", [], {});

if (res?.smart_wash === 1) {
if (res?.smart_wash === 0) {
switch (res.wash_interval) {
case 300:
return "every_5_min";
Expand All @@ -138,7 +138,7 @@ class RoborockQuirkFactory {
} else {
return "every_45_min";
}
} else if (res?.smart_wash === 0) {
} else if (res?.smart_wash === 1) {
return "every_segment";
} else {
throw new Error(`Received invalid value ${res}`);
Expand All @@ -150,31 +150,31 @@ class RoborockQuirkFactory {

switch (value) {
case "every_segment":
mode = 0;
mode = 1;
interval = 1200;
break;
case "every_5_min":
mode = 1;
mode = 0;
interval = 300;
break;
case "every_10_min":
mode = 1;
mode = 0;
interval = 600;
break;
case "every_15_min":
mode = 1;
mode = 0;
interval = 900;
break;
case "every_20_min":
mode = 1;
mode = 0;
interval = 1200;
break;
case "every_30_min":
mode = 1;
mode = 0;
interval = 1800;
break;
case "every_45_min":
mode = 1;
mode = 0;
interval = 2700;
break;
default:
Expand Down

0 comments on commit 15a6baa

Please sign in to comment.