Skip to content

Commit

Permalink
feat: handle identify properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jvandenaardweg committed Dec 28, 2022
1 parent 947441a commit eb7547a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/air-quality-sensor-accessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export class AirQualitySensorAccessory {
this.service
.getCharacteristic(this.platform.Characteristic.StatusActive)
.onGet(this.handleGetStatusActive.bind(this));

this.service
.getCharacteristic(this.platform.Characteristic.Identify)
.onGet(this.handleGetIdentify.bind(this));
}

get log() {
Expand Down Expand Up @@ -297,4 +301,10 @@ export class AirQualitySensorAccessory {

return currentValue;
}

handleGetIdentify(): Nullable<CharacteristicValue> {
this.log.warn('Identify feature not supported.');

return null;
}
}
10 changes: 10 additions & 0 deletions src/fan-accessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ export class FanAccessory {
.getCharacteristic(this.platform.Characteristic.CurrentFanState)
.onGet(this.handleGetCurrentFanState.bind(this));

this.service
.getCharacteristic(this.platform.Characteristic.Identify)
.onGet(this.handleGetIdentify.bind(this));

// this.service
// .getCharacteristic(this.platform.Characteristic.TargetFanState)
// .onSet(this.handleSetTargetFanState.bind(this))
Expand Down Expand Up @@ -583,4 +587,10 @@ export class FanAccessory {

// return currentValue;
// }

handleGetIdentify(): Nullable<CharacteristicValue> {
this.log.warn('Identify feature not supported.');

return null;
}
}

0 comments on commit eb7547a

Please sign in to comment.