Skip to content

Commit

Permalink
fix(dingz): update characteristics
Browse files Browse the repository at this point in the history
- update characteristic instead of setting them
- should pick up firmware upgrades etc. quicker
  • Loading branch information
johannrichard committed Nov 21, 2020
1 parent fddbfad commit 561d646
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/dingzAccessory.ts
Expand Up @@ -249,30 +249,33 @@ export class DingzDaAccessory extends EventEmitter {
: this.dingzDeviceInfo.front_sn;
this.accessory
.getService(this.platform.Service.AccessoryInformation)!
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'iolo AG')
.setCharacteristic(
.updateCharacteristic(
this.platform.Characteristic.Manufacturer,
'iolo AG',
)
.updateCharacteristic(
this.platform.Characteristic.AppMatchingIdentifier,
'ch.iolo.dingz.consumer',
)
// Update info from deviceInfo
.setCharacteristic(
.updateCharacteristic(
this.platform.Characteristic.ConfiguredName,
this.device.name,
)
.setCharacteristic(this.platform.Characteristic.Name, this.device.name)
.setCharacteristic(
.updateCharacteristic(this.platform.Characteristic.Name, this.device.name)
.updateCharacteristic(
this.platform.Characteristic.Model,
this.device.model as string,
)
.setCharacteristic(
.updateCharacteristic(
this.platform.Characteristic.FirmwareRevision,
this.dingzDeviceInfo.fw_version ?? 'Unknown',
)
.setCharacteristic(
.updateCharacteristic(
this.platform.Characteristic.HardwareRevision,
this.dingzDeviceInfo.hw_version_puck ?? 'Unknown',
)
.setCharacteristic(
.updateCharacteristic(
this.platform.Characteristic.SerialNumber,
serialNumber,
);
Expand Down

0 comments on commit 561d646

Please sign in to comment.