Skip to content

Commit

Permalink
add subtype to Switch/Fan Service
Browse files Browse the repository at this point in the history
  • Loading branch information
apexad committed Jun 15, 2020
1 parent 5ed0c52 commit ad79491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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)
Expand Down

0 comments on commit ad79491

Please sign in to comment.