From 88f217e2b103b8c9193a76566f1fdabab0dac990 Mon Sep 17 00:00:00 2001 From: naofireblade Date: Mon, 4 Sep 2017 00:13:44 +0200 Subject: [PATCH] Version 0.4.5 * Fixed compatibility with homebridge 0.4.23 (occupancy sensor not working) --- CHANGELOG.md | 6 +++++- index.js | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6f277d..3b3f63e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,4 +49,8 @@ ## 0.4.4 -* Fixed config parameter to disable switches/sensors not optional \ No newline at end of file +* Fixed config parameter to disable switches/sensors not optional + +## 0.4.5 + +* Fixed compatibility with homebridge 0.4.23 (occupancy sensor not working) \ No newline at end of file diff --git a/index.js b/index.js index b966954..422aaea 100644 --- a/index.js +++ b/index.js @@ -260,7 +260,7 @@ NeatoVacuumRobotAccessory.prototype = { let that = this; this.updateRobot(function (error, result) { debug(that.name + ": Is docked: " + that.robot.isDocked); - callback(false, that.robot.isDocked); + callback(false, that.robot.isDocked ? 1 : 0); }); }, @@ -328,7 +328,7 @@ NeatoVacuumRobotAccessory.prototype = { } // no commands here, values can be updated without problems - that.vacuumRobotDockStateService.setCharacteristic(Characteristic.OccupancyDetected, that.robot.isDocked); + that.vacuumRobotDockStateService.setCharacteristic(Characteristic.OccupancyDetected, that.robot.isDocked ? 1 : 0); that.vacuumRobotBatteryService.setCharacteristic(Characteristic.BatteryLevel, that.robot.charge); that.vacuumRobotBatteryService.setCharacteristic(Characteristic.ChargingState, that.robot.isCharging); diff --git a/package.json b/package.json index 1fad519..fb7592f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-neato", - "version": "0.4.4", + "version": "0.4.5", "description": "A Neato vacuum robot plugin for homebridge.", "license": "MIT", "keywords": [