Fixed homebridge startup failed when robot does not support mapping
This commit is contained in:
parent
db8305bbee
commit
1436e4b342
@ -90,4 +90,8 @@
|
|||||||
|
|
||||||
## 0.6.1
|
## 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
index.js
15
index.js
@ -44,13 +44,16 @@ NeatoVacuumRobotPlatform.prototype = {
|
|||||||
that.log("Found robot #" + (i + 1) + " named \"" + that.robots[i].name + "\" with serial \"" + that.robots[i]._serial + "\"");
|
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);
|
let robotAccessory = new NeatoVacuumRobotAccessory(that.robots[i], that);
|
||||||
accessories.push(robotAccessory);
|
accessories.push(robotAccessory);
|
||||||
that.robots[i].maps.forEach((map) => {
|
if (that.robots[i].maps && that.robots[i].maps.length > 0)
|
||||||
map.boundaries.forEach((boundary) => {
|
{
|
||||||
if (boundary.type === "polygon") {
|
that.robots[i].maps.forEach((map) => {
|
||||||
accessories.push(new NeatoVacuumRobotAccessory(that.robots[i], that, boundary))
|
map.boundaries.forEach((boundary) => {
|
||||||
}
|
if (boundary.type === "polygon") {
|
||||||
|
accessories.push(new NeatoVacuumRobotAccessory(that.robots[i], that, boundary))
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
callback(accessories);
|
callback(accessories);
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homebridge-neato",
|
"name": "homebridge-neato",
|
||||||
"version": "0.6.1",
|
"version": "0.6.2",
|
||||||
"description": "A Neato vacuum robot plugin for homebridge.",
|
"description": "A Neato vacuum robot plugin for homebridge.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
Loading…
Reference in New Issue
Block a user