From 44f550fe92d5fffd3649f1021ee8c7537784725f Mon Sep 17 00:00:00 2001 From: Arne Blumentritt Date: Mon, 10 May 2021 09:44:23 +0200 Subject: [PATCH] Fixed to spot cleaning options --- package.json | 2 +- src/accessories/neatoVacuumRobot.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a3c0323..ae4d1ba 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-neato", "displayName": "Homebridge Neato", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "A Neato vacuum robot plugin for homebridge.", "license": "MIT", "keywords": [ diff --git a/src/accessories/neatoVacuumRobot.ts b/src/accessories/neatoVacuumRobot.ts index 9428053..9d92abc 100644 --- a/src/accessories/neatoVacuumRobot.ts +++ b/src/accessories/neatoVacuumRobot.ts @@ -108,6 +108,11 @@ export class NeatoVacuumRobotAccessory // Start background update this.updateRobotPeriodically().then(() => { + // Add special characteristics to set spot cleaning options + this.spotPlusFeatures = ((typeof this.robot.availableServices.spotCleaning !== 'undefined') && this.robot.availableServices.spotCleaning.includes("basic")); + this.addSpotCleanCharacteristics(); + + // Save/Load options if (!accessory.context.options) { this.options.eco = this.robot.eco; @@ -115,10 +120,6 @@ export class NeatoVacuumRobotAccessory this.options.extraCare = this.robot.navigationMode == 2; this.debug(DebugType.INFO, "Options initially set to eco: " + this.options.eco + ", noGoLines: " + this.options.noGoLines + ", extraCare: " + this.options.extraCare); accessory.context.options = this.options; - - // Add special characteristics to set spot cleaning options - this.spotPlusFeatures = ((typeof this.robot.availableServices.spotCleaning !== 'undefined') && this.robot.availableServices.spotCleaning.includes("basic")); - this.addSpotCleanCharacteristics(); } else {