Skip to content

Commit

Permalink
Fixed homebridge startup failed when robot does not support mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
naofireblade committed Jul 31, 2019
1 parent db8305b commit 1436e4b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,8 @@

## 0.6.1

* Fixed homebridge startup failed when robot does not support zone cleaning
* Fixed homebridge startup failed when robot does not support zone cleaning

## 0.6.2

* Fixed homebridge startup failed when robot does not support mapping
15 changes: 9 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ NeatoVacuumRobotPlatform.prototype = {
that.log("Found robot #" + (i + 1) + " named \"" + that.robots[i].name + "\" with serial \"" + that.robots[i]._serial + "\"");
let robotAccessory = new NeatoVacuumRobotAccessory(that.robots[i], that);
accessories.push(robotAccessory);
that.robots[i].maps.forEach((map) => {
map.boundaries.forEach((boundary) => {
if (boundary.type === "polygon") {
accessories.push(new NeatoVacuumRobotAccessory(that.robots[i], that, boundary))
}
if (that.robots[i].maps && that.robots[i].maps.length > 0)
{
that.robots[i].maps.forEach((map) => {
map.boundaries.forEach((boundary) => {
if (boundary.type === "polygon") {
accessories.push(new NeatoVacuumRobotAccessory(that.robots[i], that, boundary))
}
})
})
})
}
}
callback(accessories);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-neato",
"version": "0.6.1",
"version": "0.6.2",
"description": "A Neato vacuum robot plugin for homebridge.",
"license": "MIT",
"keywords": [
Expand Down

0 comments on commit 1436e4b

Please sign in to comment.