From f2e199f79223c7b30f7c7f815608bdd2a8de7ee4 Mon Sep 17 00:00:00 2001 From: Christian Friedrich Coors Date: Fri, 25 Jun 2021 13:17:57 +0200 Subject: [PATCH 1/2] fix(vendor.dreame): Handle power saving mode --- backend/lib/entities/state/attributes/StatusStateAttribute.js | 3 ++- backend/lib/robots/dreame/DreameValetudoRobot.js | 2 +- frontend/lib/home.js | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/lib/entities/state/attributes/StatusStateAttribute.js b/backend/lib/entities/state/attributes/StatusStateAttribute.js index 0c88eb553e3..5b6640b18f5 100644 --- a/backend/lib/entities/state/attributes/StatusStateAttribute.js +++ b/backend/lib/entities/state/attributes/StatusStateAttribute.js @@ -37,7 +37,8 @@ StatusStateAttribute.VALUE = Object.freeze({ CLEANING: "cleaning", PAUSED: "paused", MANUAL_CONTROL: "manual_control", - MOVING: "moving" + MOVING: "moving", + POWER_SAVE: "power_save" }); /** diff --git a/backend/lib/robots/dreame/DreameValetudoRobot.js b/backend/lib/robots/dreame/DreameValetudoRobot.js index 9dfd7dc1be5..50c9a88de5c 100644 --- a/backend/lib/robots/dreame/DreameValetudoRobot.js +++ b/backend/lib/robots/dreame/DreameValetudoRobot.js @@ -204,7 +204,7 @@ DreameValetudoRobot.STATUS_MAP = Object.freeze({ value: stateAttrs.StatusStateAttribute.VALUE.MANUAL_CONTROL }, 14: { - value: stateAttrs.StatusStateAttribute.VALUE.DOCKED + value: stateAttrs.StatusStateAttribute.VALUE.POWER_SAVE }, 15: { value: stateAttrs.StatusStateAttribute.VALUE.DOCKED diff --git a/frontend/lib/home.js b/frontend/lib/home.js index 59f3d95e217..5b8d245015a 100644 --- a/frontend/lib/home.js +++ b/frontend/lib/home.js @@ -393,6 +393,7 @@ async function updateHomePage() { buttonStateMap.spot = false; break; case "idle": + case "power_save": buttonStateMap.pause = false; buttonStateMap.stop = false; break; From 572c0ee3d5a03f5e05aacdb251d1275408074055 Mon Sep 17 00:00:00 2001 From: Christian Friedrich Coors Date: Fri, 25 Jun 2021 13:19:43 +0200 Subject: [PATCH 2/2] fix(vendor.dreame): Ignore audio volume property changes --- backend/lib/robots/dreame/DreameGen2ValetudoRobot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/lib/robots/dreame/DreameGen2ValetudoRobot.js b/backend/lib/robots/dreame/DreameGen2ValetudoRobot.js index 4e0c7f4ab7e..3529adeead6 100644 --- a/backend/lib/robots/dreame/DreameGen2ValetudoRobot.js +++ b/backend/lib/robots/dreame/DreameGen2ValetudoRobot.js @@ -487,6 +487,7 @@ class DreameGen2ValetudoRobot extends DreameValetudoRobot { this.parseAndUpdateState([e]); break; case MIOT_SERVICES.DEVICE.SIID: + case MIOT_SERVICES.AUDIO.SIID: case 99: //This seems to be a duplicate of the device service //Intentionally ignored break;