Skip to content

Commit

Permalink
Register device info characteristics
Browse files Browse the repository at this point in the history
  • Loading branch information
sajmonr committed Mar 9, 2023
1 parent de15e4e commit 7713df0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/accessories/hubspace-accessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export abstract class HubspaceAccessory{
this.log = platform.log;
this.deviceService = platform.deviceService;
this.device = accessory.context.device;

this.accessory.getService(this.platform.Service.AccessoryInformation)!
.setCharacteristic(this.platform.Characteristic.Manufacturer, this.device.manufacturer ?? 'N/A')
.setCharacteristic(this.platform.Characteristic.Model, this.device.model.length > 0 ? this.device.model[0] : 'N/A')
.setCharacteristic(this.platform.Characteristic.SerialNumber, this.device.deviceId ?? 'N/A');

}

/**
Expand Down

0 comments on commit 7713df0

Please sign in to comment.