homebridge-misfit-bolt
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -95,3 +95,3 @@ var debug = require('debug')(require('../package').name); | ||
debug('timed out'); | ||
callback(); | ||
callback(new Error('timed out')); | ||
}, this.timeout); | ||
@@ -106,3 +106,3 @@ | ||
debug('got value:', value); | ||
callback(value); | ||
callback(error, value); | ||
} | ||
@@ -125,3 +125,8 @@ }); | ||
this.log('Getting state'); | ||
this.get('getState', function(state) { | ||
this.get('getState', function(error, state) { | ||
if (error) { | ||
debug('Error', error); | ||
callback(error); | ||
return; | ||
} | ||
that.log('Got state: ', state); | ||
@@ -144,7 +149,12 @@ callback(null, state); | ||
var that = this; | ||
this.get('getRGBA', function(rgba) { | ||
this.get('getRGBA', function(error, rgba) { | ||
if (error) { | ||
debug('Error', error); | ||
callback(error); | ||
return; | ||
} | ||
debug('Got RGBA: ', rgba); | ||
that.color = new Color(`rgba(${rgba})`); | ||
that.brightness = rgba.pop(); | ||
callback(rgba); | ||
callback(null, rgba); | ||
}); | ||
@@ -166,3 +176,8 @@ }; | ||
this.log('Getting hue'); | ||
this.getRGBA(function() { | ||
this.getRGBA(function(error) { | ||
if (error) { | ||
debug('Error', error); | ||
callback(error); | ||
return; | ||
} | ||
that.log('Got hue: ', that.color.hue()); | ||
@@ -186,3 +201,8 @@ callback(null, that.color.hue()); | ||
this.log('Getting saturation'); | ||
this.getRGBA(function() { | ||
this.getRGBA(function(error) { | ||
if (error) { | ||
debug('Error', error); | ||
callback(error); | ||
return; | ||
} | ||
that.log('Got saturation: ', that.color.saturation()); | ||
@@ -206,3 +226,8 @@ callback(null, that.color.saturation()); | ||
this.log('Getting brightness'); | ||
this.getRGBA(function() { | ||
this.getRGBA(function(error) { | ||
if (error) { | ||
debug('Error', error); | ||
callback(error); | ||
return; | ||
} | ||
that.log('Got brightness: ', that.brightness); | ||
@@ -209,0 +234,0 @@ callback(null, that.brightness); |
{ | ||
"name": "homebridge-misfit-bolt", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Misfit Bolt plugin for homebridge", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10642
242