mirror of https://github.com/Hypfer/Valetudo.git
28 lines
978 B
JavaScript
28 lines
978 B
JavaScript
const entities = require("../../../entities");
|
|
const MopDockCleanManualTriggerCapability = require("../../../core/capabilities/MopDockCleanManualTriggerCapability");
|
|
|
|
/**
|
|
* @extends MopDockCleanManualTriggerCapability<import("../MockRobot")>
|
|
*/
|
|
class MockMopDockCleanManualTriggerCapability extends MopDockCleanManualTriggerCapability {
|
|
/**
|
|
* @returns {Promise<void>}
|
|
*/
|
|
async startCleaning() {
|
|
this.robot.state.upsertFirstMatchingAttribute(new entities.state.attributes.DockStatusStateAttribute({
|
|
value: entities.state.attributes.DockStatusStateAttribute.VALUE.CLEANING
|
|
}));
|
|
}
|
|
|
|
/**
|
|
* @returns {Promise<void>}
|
|
*/
|
|
async stopCleaning() {
|
|
this.robot.state.upsertFirstMatchingAttribute(new entities.state.attributes.DockStatusStateAttribute({
|
|
value: entities.state.attributes.DockStatusStateAttribute.VALUE.IDLE
|
|
}));
|
|
}
|
|
}
|
|
|
|
module.exports = MockMopDockCleanManualTriggerCapability;
|