@@ -188,6 +188,7 @@ HttpPushRgb.prototype = {
188188
189189 this . getPowerState ( ( error , onState ) => {
190190
191+ // eslint-disable-next-line no-unused-vars
191192 this . setPowerState ( ! onState , ( error , responseBody ) => {
192193 // Ignore any possible error, just continue as if nothing happened.
193194 setTimeout ( ( ) => {
@@ -277,8 +278,6 @@ HttpPushRgb.prototype = {
277278 * @param {function } jsonRequest The characteristic and characteristic value to update.
278279 */
279280 handleNotification : function ( jsonRequest ) {
280- const service = jsonRequest . service ;
281-
282281 const characteristic = jsonRequest . characteristic ;
283282 const value = jsonRequest . value ;
284283
@@ -373,10 +372,11 @@ HttpPushRgb.prototype = {
373372 if ( this . brightness ) {
374373 this . _httpRequest ( this . brightness . status . url , '' , 'GET' , function ( error , response , responseBody ) {
375374 if ( ! this . _handleHttpErrorResponse ( 'getBrightness()' , error , response , responseBody , callback ) ) {
375+ var level ;
376376 if ( typeof this . brightness . status . bodyRegEx === 'object' ) {
377- var level = responseBody . match ( this . brightness . status . bodyRegEx ) [ 1 ] ;
377+ level = parseInt ( responseBody . match ( this . brightness . status . bodyRegEx ) [ 1 ] ) ;
378378 } else {
379- var level = parseInt ( responseBody ) ;
379+ level = parseInt ( responseBody ) ;
380380 }
381381
382382 level = parseInt ( 100 / this . brightness . max * level ) ;
0 commit comments