Skip to content

Commit

Permalink
fix(mqtt): Map zone presets to zones (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
depau authored Apr 18, 2021
1 parent 38b8ca8 commit 8ac882f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/mqtt/capabilities/ZoneCleaningCapabilityMqttHandle.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class ZoneCleaningCapabilityMqttHandle extends CapabilityMqttHandle {
if (loadedZones.includes(undefined)) {
throw new Error("Invalid zone IDs found in start payload");
}
await this.capability.start(loadedZones);
try {
await this.capability.start(loadedZones.flatMap(value => value.zones));
} catch (e) {
throw new Error("Error while starting zone cleaning for zone_ids " + ids.join(",") + ": " + e);
}
}
})
);
Expand Down

0 comments on commit 8ac882f

Please sign in to comment.