Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.setLoss = function(results) {
var measureImages = deferred.map(
results.images,
deferred.gate(function(result) {
var original = results.imagesByToolByName.photoshop[result.name];
return result.compareTo(original);
}, 50)
);
return measureImages().then(function() {
return results;
});
};
'%s: %s %s v%s, api v%s', this.name, this.manufacturer,
this.model, obj.swversion, obj.apiversion
)
this.version = obj.apiversion
this.config.nativeHomeKitLights = false
this.config.nativeHomeKitSensors = false
this.username = 'homebridgehue'
break
default:
this.log.warn(
'%s: warning: ignoring unknown bridge/gateway %j',
this.name, obj
)
throw new Error('unknown bridge')
}
this.request = deferred.gate(
this._request,
this.platform.config.parallelRequests || this.config.parallelRequests
)
this.infoService = new Service.AccessoryInformation()
this.serviceList.push(this.infoService)
this.infoService
.updateCharacteristic(Characteristic.Manufacturer, this.manufacturer)
.updateCharacteristic(Characteristic.Model, this.model)
.updateCharacteristic(Characteristic.SerialNumber, this.serialNumber)
.updateCharacteristic(Characteristic.FirmwareRevision, this.version)
this.obj = obj
this.service = new my.Services.HueBridge(this.name)
this.serviceList.push(this.service)
this.service.getCharacteristic(my.Characteristics.Heartrate)
.updateValue(this.state.heartrate)