From ad79491d321d1b8d2534c0df3186847c17382703 Mon Sep 17 00:00:00 2001 From: apexad <1437332+apexad@users.noreply.github.com> Date: Mon, 15 Jun 2020 10:03:36 -0700 Subject: [PATCH] add subtype to Switch/Fan Service --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index c711e44..59eb771 100644 --- a/src/index.ts +++ b/src/index.ts @@ -57,7 +57,7 @@ class EufyRoboVacAccessory implements AccessoryPlugin { }; this.services = []; - this.vacuumService = config.useSwitchService ? new hap.Service.Switch(this.name) : new hap.Service.Fan(this.name); + this.vacuumService = config.useSwitchService ? new hap.Service.Switch(this.name, 'vacuum') : new hap.Service.Fan(this.name, 'vacuum'); this.vacuumService.getCharacteristic(hap.Characteristic.On) .on(CharacteristicEventTypes.GET, this.getCleanState.bind(this)) .on(CharacteristicEventTypes.SET, this.setCleanState.bind(this)); @@ -81,7 +81,7 @@ class EufyRoboVacAccessory implements AccessoryPlugin { this.services.push(this.batteryService); if (!this.hideFindButton) { - this.findRobotService = new hap.Service.Switch(`Find ${this.name}`); + this.findRobotService = new hap.Service.Switch(`Find ${this.name}`, 'find'); this.findRobotService .getCharacteristic(hap.Characteristic.On)