From 3513cbc698cdc27fee86c9dda12f0f98e5eba957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Beye?= Date: Mon, 23 Sep 2024 18:35:29 +0200 Subject: [PATCH] fix(vendor.dreame): Fix MopDockCleanManualTriggerCapability for everything that is not a pure mop --- backend/lib/robots/dreame/DreameMopValetudoRobot.js | 6 +++++- .../DreameMopDockCleanManualTriggerCapability.js | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/lib/robots/dreame/DreameMopValetudoRobot.js b/backend/lib/robots/dreame/DreameMopValetudoRobot.js index 2977814bd89..8b79c22da53 100644 --- a/backend/lib/robots/dreame/DreameMopValetudoRobot.js +++ b/backend/lib/robots/dreame/DreameMopValetudoRobot.js @@ -93,10 +93,14 @@ class DreameMopValetudoRobot extends DreameGen2ValetudoRobot { piid: DreameGen2ValetudoRobot.MIOT_SERVICES.VACUUM_2.PROPERTIES.MOP_DOCK_SETTINGS.PIID })); + this.registerCapability(new capabilities.DreameMopDockCleanManualTriggerCapability({ + robot: this, + legacy: true + })); + [ capabilities.DreameCarpetModeControlCapability, capabilities.DreameKeyLockCapability, - capabilities.DreameMopDockCleanManualTriggerCapability, capabilities.DreameMopDockDryManualTriggerCapability, capabilities.DreameMopMappingPassCapability, ].forEach(capability => { diff --git a/backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js b/backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js index cdc2a9906ea..5d3c9e0becf 100644 --- a/backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js +++ b/backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js @@ -12,6 +12,7 @@ class DreameMopDockCleanManualTriggerCapability extends MopDockCleanManualTrigge /** * @param {object} options * @param {import("../DreameValetudoRobot")} options.robot + * @param {boolean} [options.legacy] */ constructor(options) { super(options); @@ -21,6 +22,8 @@ class DreameMopDockCleanManualTriggerCapability extends MopDockCleanManualTrigge this.additionalCleanupParametersPiid = DreameMiotServices["GEN2"].VACUUM_2.PROPERTIES.ADDITIONAL_CLEANUP_PROPERTIES.PIID; this.helper = new DreameMiotHelper({robot: this.robot}); + + this.legacy = !!options.legacy; } /** @@ -49,7 +52,7 @@ class DreameMopDockCleanManualTriggerCapability extends MopDockCleanManualTrigge [ { piid: this.additionalCleanupParametersPiid, - value: "1,1" + value: !this.legacy ? "2,1" : "1,1" } ] );