Merge remote-tracking branch 'nfarina/master'

This commit is contained in:
straccio
2016-04-11 09:45:54 +02:00
3 changed files with 5 additions and 4 deletions

View File

@@ -133,6 +133,7 @@ PlatformAccessory.prototype.updateReachability = function(reachable) {
PlatformAccessory.prototype._prepareAssociatedHAPAccessory = function () {
this._associatedHAPAccessory = new Accessory(this.displayName, this.UUID);
this._associatedHAPAccessory._sideloadServices(this.services);
this._associatedHAPAccessory.category = this.category;
this._associatedHAPAccessory.reachable = this.reachable;
this._associatedHAPAccessory.on('identify', function(paired, callback) {
if (this.listeners('identify').length > 0) {

View File

@@ -466,7 +466,7 @@ Server.prototype._handleNewConfig = function(type, name, replace, config) {
this._config.accessories.push(config);
} else {
var targetName;
if (name.indexOf('.') == -1) {
if (name.indexOf('.') !== -1) {
targetName = name.split(".")[1];
}
var found = false;
@@ -498,7 +498,7 @@ Server.prototype._handleNewConfig = function(type, name, replace, config) {
this._config.platforms.push(config);
} else {
var targetName;
if (name.indexOf('.') == -1) {
if (name.indexOf('.') !== -1) {
targetName = name.split(".")[1];
}