mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
New bridge configs
"bridge": {
"manufacturer": "Manufacturer here",
"serialNumber": "Serial number here",
"model": "Model here"
}
This commit is contained in:
@@ -87,6 +87,14 @@ Server.prototype.run = function() {
|
||||
Server.prototype._publish = function() {
|
||||
// pull out our custom Bridge settings from config.json, if any
|
||||
var bridgeConfig = this._config.bridge || {};
|
||||
|
||||
var info = this._bridge.getService(Service.AccessoryInformation);
|
||||
if (bridgeConfig.manufacturer)
|
||||
info.setCharacteristic(Characteristic.Manufacturer, bridgeConfig.manufacturer);
|
||||
if (bridgeConfig.model)
|
||||
info.setCharacteristic(Characteristic.Model, bridgeConfig.model);
|
||||
if (bridgeConfig.serialNumber)
|
||||
info.setCharacteristic(Characteristic.SerialNumber, bridgeConfig.serialNumber);
|
||||
|
||||
this._printPin(bridgeConfig.pin);
|
||||
this._bridge.publish({
|
||||
|
||||
Reference in New Issue
Block a user