mirror of
https://github.com/dtwardow/homebridge-multi-tap-switch.git
synced 2026-11-01 20:18:30 +00:00
Provide identifiers for better identification in Home apps
This commit is contained in:
1 parent
6640dc3d07
commit
ac935d9cf5
1 file changed
+5
-3
@@ -49,9 +49,9 @@ export class DeviceAccessory {
|
|||||||
*/
|
*/
|
||||||
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
||||||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'HB/dtw')
|
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'HB/dtw')
|
||||||
.setCharacteristic(this.platform.Characteristic.Model, 'SceneSwitch')
|
.setCharacteristic(this.platform.Characteristic.Model, 'Multi-Tap-Switch')
|
||||||
.setCharacteristic(this.platform.Characteristic.Version, VERSION)
|
.setCharacteristic(this.platform.Characteristic.Version, VERSION)
|
||||||
.setCharacteristic(this.platform.Characteristic.SerialNumber, accessory.UUID);
|
.setCharacteristic(this.platform.Characteristic.SerialNumber, this.Config.Name());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Input Service / Switch
|
* Input Service / Switch
|
||||||
@@ -115,7 +115,9 @@ export class DeviceAccessory {
|
|||||||
this.serviceOut.addLinkedService(newButton);
|
this.serviceOut.addLinkedService(newButton);
|
||||||
newButton.getCharacteristic(this.platform.Characteristic.ProgrammableSwitchEvent)
|
newButton.getCharacteristic(this.platform.Characteristic.ProgrammableSwitchEvent)
|
||||||
.setProps(this.singleButtonEvents);
|
.setProps(this.singleButtonEvents);
|
||||||
newButton.setCharacteristic(this.platform.Characteristic.ServiceLabelIndex, i);
|
newButton
|
||||||
|
.setCharacteristic(this.platform.Characteristic.ServiceLabelIndex, i)
|
||||||
|
.setCharacteristic(this.platform.Characteristic.Name, 'Scene ' + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push switches to an internal list for later use
|
// Push switches to an internal list for later use
|
||||||
|
|||||||
Reference in new issue
Block a user