@@ -418,12 +418,12 @@ HttpPushRgb.prototype = {
418418 * @param {function } callback The callback that handles the response.
419419 */
420420 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." ) ) ;
424424 return ;
425425 }
426- var url = this . color . status . url ;
426+ var url = this . color . status ;
427427
428428 this . _httpRequest ( url , '' , 'GET' , function ( error , response , responseBody ) {
429429 if ( ! this . _handleHttpErrorResponse ( 'getHue()' , error , response , responseBody , callback ) ) {
@@ -449,8 +449,8 @@ HttpPushRgb.prototype = {
449449 * @param {function } callback The callback that handles the response.
450450 */
451451 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." ) ;
454454 callback ( new Error ( "There was a problem parsing the 'color' section of your configuration." ) ) ;
455455 return ;
456456 }
@@ -470,12 +470,12 @@ HttpPushRgb.prototype = {
470470 * @param {function } callback The callback that handles the response.
471471 */
472472 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." ) ;
475475 callback ( new Error ( "There was a problem parsing the 'color' section of your configuration." ) ) ;
476476 return ;
477477 }
478- var url = this . color . status . url ;
478+ var url = this . color . status ;
479479
480480 this . _httpRequest ( url , '' , 'GET' , function ( error , response , responseBody ) {
481481 if ( ! this . _handleHttpErrorResponse ( 'getSaturation()' , error , response , responseBody , callback ) ) {
@@ -503,7 +503,7 @@ HttpPushRgb.prototype = {
503503 */
504504 setSaturation : function ( level , callback ) {
505505 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." ) ;
507507 callback ( new Error ( "There was a problem parsing the 'color' section of your configuration." ) ) ;
508508 return ;
509509 }
0 commit comments