@@ -418,12 +418,12 @@ HttpPushRgb.prototype = {
418
418
* @param {function } callback The callback that handles the response.
419
419
*/
420
420
getHue : function ( callback ) {
421
- if ( this . color && typeof this . color . status . url !== 'string' ) {
422
- this . log . warn ( "Ignoring request; problem with 'color' variables." ) ;
423
- callback ( new Error ( "There was a problem parsing the 'color' section of your configuration." ) ) ;
421
+ if ( this . color && typeof this . color . status !== 'string' ) {
422
+ this . log . warn ( "Ignoring getHue request; problem with 'color' variables." ) ;
423
+ callback ( new Error ( "There was a problem parsing the 'color.status ' section of your configuration." ) ) ;
424
424
return ;
425
425
}
426
- var url = this . color . status . url ;
426
+ var url = this . color . status ;
427
427
428
428
this . _httpRequest ( url , '' , 'GET' , function ( error , response , responseBody ) {
429
429
if ( ! this . _handleHttpErrorResponse ( 'getHue()' , error , response , responseBody , callback ) ) {
@@ -449,8 +449,8 @@ HttpPushRgb.prototype = {
449
449
* @param {function } callback The callback that handles the response.
450
450
*/
451
451
setHue : function ( level , callback ) {
452
- if ( this . color && typeof this . color . set_url . url !== 'string' ) {
453
- this . log . warn ( "Ignoring request; problem with 'color' variables." ) ;
452
+ if ( this . color && typeof this . color . set_url . url !== 'string' ) {
453
+ this . log . warn ( "Ignoring setHue request; problem with 'color' variables." ) ;
454
454
callback ( new Error ( "There was a problem parsing the 'color' section of your configuration." ) ) ;
455
455
return ;
456
456
}
@@ -470,12 +470,12 @@ HttpPushRgb.prototype = {
470
470
* @param {function } callback The callback that handles the response.
471
471
*/
472
472
getSaturation : function ( callback ) {
473
- if ( this . color && typeof this . color . status . url !== 'string' ) {
474
- this . log . warn ( "Ignoring request; problem with 'color' variables." ) ;
473
+ if ( this . color && typeof this . color . status !== 'string' ) {
474
+ this . log . warn ( "Ignoring getSaturation request; problem with 'color' variables." ) ;
475
475
callback ( new Error ( "There was a problem parsing the 'color' section of your configuration." ) ) ;
476
476
return ;
477
477
}
478
- var url = this . color . status . url ;
478
+ var url = this . color . status ;
479
479
480
480
this . _httpRequest ( url , '' , 'GET' , function ( error , response , responseBody ) {
481
481
if ( ! this . _handleHttpErrorResponse ( 'getSaturation()' , error , response , responseBody , callback ) ) {
@@ -503,7 +503,7 @@ HttpPushRgb.prototype = {
503
503
*/
504
504
setSaturation : function ( level , callback ) {
505
505
if ( this . color && typeof this . color . set_url . url !== 'string' ) {
506
- this . log . warn ( "Ignoring request; problem with 'color' variables." ) ;
506
+ this . log . warn ( "Ignoring setSaturation request; problem with 'color' variables." ) ;
507
507
callback ( new Error ( "There was a problem parsing the 'color' section of your configuration." ) ) ;
508
508
return ;
509
509
}
0 commit comments