     {
       return request->requestAuthentication();
     }
-    AsyncResponseStream *response;
     uint8_t channelNumber;
     char   nvsKeyname[16];
     channelNumber = checkChannelNumber( request);

      channel[ channelNumber ].minimumLevel = minLevel;
      snprintf( nvsKeyname, sizeof( nvsKeyname ), "channelminimum%i", channelNumber );
      preferences.putFloat( nvsKeyname, channel[channelNumber].minimumLevel );
      response = request->beginResponseStream( HEADER_HTML );
      response->printf( "channel %i minimum set to %.2f%%", channelNumber + 1, channel[ channelNumber ].minimumLevel );
      return request->send( response );
    }

      snprintf( channel[ channelNumber ].color, sizeof( channel[ channelNumber ].color ), "#%s", request->arg( "color" ).c_str() );
      snprintf( nvsKeyname, sizeof( nvsKeyname ), "channelcolor%i", channelNumber );
      preferences.putString( nvsKeyname, channel[channelNumber].color );
      AsyncResponseStream *response = request->beginResponseStream( HEADER_HTML );
      response->printf( "channel %i color set to %s", channelNumber + 1, channel[ channelNumber ].color );
      return request->send( response );
    }
