Skip to content

Commit b9daed9

Browse files
committed
Recognise more Roomba phases
1 parent 70a606e commit b9daed9

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.changeset/orange-worms-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"homebridge-roomba2": patch
3+
---
4+
5+
Recognise more Roomba phases, including more docking phases and stuck

src/accessory.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ export default class RoombaAccessory implements AccessoryPlugin {
517517
status.batteryLevel = state.batPct!;
518518
status.binFull = state.bin!.full;
519519

520+
/* See https://www.openhab.org/addons/bindings/irobot/ for a list of phases */
520521
switch (state.cleanMissionStatus!.phase) {
521522
case "run":
522523
status.running = true;
@@ -525,18 +526,22 @@ export default class RoombaAccessory implements AccessoryPlugin {
525526

526527
break;
527528
case "charge":
529+
case "recharge":
528530
status.running = false;
529531
status.charging = true;
530532
status.docking = false;
531533

532534
break;
533535
case "hmUsrDock":
536+
case "hmMidMsn":
537+
case "hmPostMsn":
534538
status.running = false;
535539
status.charging = false;
536540
status.docking = true;
537541

538542
break;
539543
case "stop":
544+
case "stuck":
540545
status.running = false;
541546
status.charging = false;
542547
status.docking = false;

src/dorita980.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ declare module "dorita980" {
2222
full: boolean
2323
}
2424
cleanMissionStatus?: {
25-
phase: "run" | "charge" | "stop" | "hmUsrDock"
25+
phase: string
2626
}
2727
}
2828

0 commit comments

Comments
 (0)