Skip to content

Commit

Permalink
fix(vendor.viomi): Fix operation mode selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Mar 19, 2021
1 parent 200b13b commit 710758d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/robots/viomi/capabilities/ViomiBasicControlCapability.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class ViomiBasicControlCapability extends BasicControlCapability {
attributeType: stateAttrs.AttachmentStateAttribute.TYPE.MOP
});

if (mopAttribute) {
if (waterboxAttribute && dustbinAttribute) {
if (mopAttribute?.attached) {
if (waterboxAttribute?.attached && dustbinAttribute?.attached) {
return attributes.ViomiOperationMode.MIXED;
}
return attributes.ViomiOperationMode.MOP;
Expand Down

0 comments on commit 710758d

Please sign in to comment.