Skip to content

Commit

Permalink
fix(vendor.roborock): Fix map not being available on a fresh boot for…
Browse files Browse the repository at this point in the history
… another 60s
  • Loading branch information
Hypfer committed Mar 8, 2021
1 parent 3fa8232 commit f4c4c1a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/robots/roborock/RoborockValetudoRobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,14 @@ class RoborockValetudoRobot extends MiioValetudoRobot {
}

if (res && res[0] === "retry") {
repollSeconds += 1;
/**
* This fixes the map not being available on boot for another 60 seconds which is annoying
*/
if (this.state.map.metaData.defaultMap !== true) {
repollSeconds += 1;
} else {
repollSeconds = 2;
}
}

setTimeout(() => this.pollMap(), repollSeconds * 1000);
Expand Down

0 comments on commit f4c4c1a

Please sign in to comment.