Skip to content

Commit

Permalink
fix(vendor.dreame): Fix MopDockCleanManualTriggerCapability for every…
Browse files Browse the repository at this point in the history
…thing that is not a pure mop
  • Loading branch information
Hypfer committed Sep 23, 2024
1 parent 76280bd commit 3513cbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion backend/lib/robots/dreame/DreameMopValetudoRobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class DreameMopDockCleanManualTriggerCapability extends MopDockCleanManualTrigge
/**
* @param {object} options
* @param {import("../DreameValetudoRobot")} options.robot
* @param {boolean} [options.legacy]
*/
constructor(options) {
super(options);
Expand All @@ -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;
}

/**
Expand Down Expand Up @@ -49,7 +52,7 @@ class DreameMopDockCleanManualTriggerCapability extends MopDockCleanManualTrigge
[
{
piid: this.additionalCleanupParametersPiid,
value: "1,1"
value: !this.legacy ? "2,1" : "1,1"
}
]
);
Expand Down

0 comments on commit 3513cbc

Please sign in to comment.