diff --git a/config.schema.json b/config.schema.json index 34e2771..7c8215c 100644 --- a/config.schema.json +++ b/config.schema.json @@ -55,7 +55,7 @@ "type": "string", "enum": [ "clean", - "cleanThe", + "cleanZone", "cleanSpot", "goToDock", "dockState", @@ -84,7 +84,7 @@ }, "default": [ "clean", - "cleanThe", + "cleanZone", "goToDock", "dockState", "binFull", diff --git a/src/accessories/koboldVacuumRobot.ts b/src/accessories/koboldVacuumRobot.ts index 580037a..b246f4d 100644 --- a/src/accessories/koboldVacuumRobot.ts +++ b/src/accessories/koboldVacuumRobot.ts @@ -131,11 +131,11 @@ export class KoboldVacuumRobotAccessory setCharacteristicHandler: this.setGoToDock }]); this.dockStateService = this.registerService(RobotService.DOCKED, this.platform.Service.OccupancySensor, [{ - characteristic: this.platform.Characteristic.OccupancyDetected, + characteristic: this.platform.Characteristic.OccupancyDetected.OccupancyDetected, getCharacteristicHandler: this.getDocked, }]); this.binFullService = this.registerService(RobotService.BIN_FULL, this.platform.Service.OccupancySensor, [{ - characteristic: this.platform.Characteristic.OccupancyDetected, + characteristic: this.platform.Characteristic.OccupancyDetected.OccupancyDetected, getCharacteristicHandler: this.getBinFull, }]); this.findMeService = this.registerService(RobotService.FIND_ME, this.platform.Service.Switch, [{ @@ -240,7 +240,7 @@ export class KoboldVacuumRobotAccessory service = this.accessory.addService(serviceType, displayName, serviceName); } characteristicHandlers.forEach(ch => { - const char = service.getCharacteristic(ch.characteristic) + var char = service.getCharacteristic(ch.characteristic) if (ch.getCharacteristicHandler) {char.onGet(ch.getCharacteristicHandler)} if (ch.setCharacteristicHandler) {char.onSet(ch.setCharacteristicHandler)} }); diff --git a/src/homebridgeKoboldPlatform.ts b/src/homebridgeKoboldPlatform.ts index b42658b..bb2db04 100644 --- a/src/homebridgeKoboldPlatform.ts +++ b/src/homebridgeKoboldPlatform.ts @@ -40,7 +40,6 @@ export class HomebridgeKoboldPlatform implements DynamicPlatformPlugin discoverRobots() { const client = new KoboldApi.Client(); - this.log.debug("blub"); try { @@ -126,6 +125,7 @@ export class HomebridgeKoboldPlatform implements DynamicPlatformPlugin try { robot.meta = state.meta; + robot.availableServices = state.availableServices; // Update existing robot accessor if (cachedRobot) diff --git a/src/localization.ts b/src/localization.ts index d54365f..185625b 100644 --- a/src/localization.ts +++ b/src/localization.ts @@ -7,6 +7,7 @@ export enum availableLocales { const localizationDicts = { 'en': { "clean": "Clean", + "cleanZone": "Clean Zone", "cleanThe": "Clean the", "goToDock": "Go to Dock", "dockState": "Docked", @@ -21,6 +22,7 @@ const localizationDicts = { }, 'de': { "clean": "Sauge", + "cleanZone": "Sauge Zone", "cleanThe": "Sauge", "goToDock": "Zur Basis", "dockState": "In der Basis", @@ -35,6 +37,7 @@ const localizationDicts = { }, 'fr': { "clean": "Aspirer", + "cleanZone": "Aspirer Zone", "cleanThe": "Aspirer", "goToDock": "Retour à la base", "dockState": "Sur la base", diff --git a/src/models/services.ts b/src/models/services.ts index c62450b..eb8dfab 100644 --- a/src/models/services.ts +++ b/src/models/services.ts @@ -6,6 +6,7 @@ export enum CleanType { export enum RobotService { CLEAN = "clean", CLEAN_SPOT = "cleanSpot", + CLEAN_ZONE = "cleanZone", GO_TO_DOCK = "goToDock", DOCKED = "dockState", BIN_FULL = "binFull",