Skip to content

Commit

Permalink
Merge pull request #15 from sajmonr/8-add-display-of-manufacture-and-…
Browse files Browse the repository at this point in the history
…model

8 Add display of manufacture and model
  • Loading branch information
sajmonr authored Mar 9, 2023
2 parents de15e4e + 7713df0 commit 19aa2f5
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 19aa2f5

Please sign in to comment.