     ledcAttachPin( channel[channelNumber].pin, channelNumber);
   }
 
-  setupDimmerPWMfrequency( readDoubleNVS( "pwmfrequency", LEDC_MAXIMUM_FREQ ), readInt8NVS( "pwmdepth", LEDC_NUMBER_OF_BIT ) );
+  setupDimmerPWMfrequency( readDoubleNVS( "pwmfrequency", LEDC_MAXIMUM_FREQ ),
+                           readInt8NVS( "pwmdepth", LEDC_NUMBER_OF_BIT ) );
 
   lightStatus = "LIGHTS AUTO";
 

void dimmerTask ( void * pvParameters )
{
  const uint32_t dimmerTaskdelayTime = 1000 / UPDATE_FREQ_LEDS;

  TickType_t xLastWakeTime;



    localTime = localtime( &microSecondTime.tv_sec );

    suseconds_t milliSecondsToday = ( localTime->tm_hour       * 3600000U ) +
                                    ( localTime->tm_min        * 60000U ) +
                                    ( localTime->tm_sec        * 1000U ) +
                                    ( microSecondTime.tv_usec  / 1000U );

    if ( milliSecondsToday ) /* to solve flashing at 00:00:000 due to the fact that the first timer has no predecessor */
    {
      for ( uint8_t channelNumber = 0; channelNumber < NUMBER_OF_CHANNELS; channelNumber++ )
      {
        uint8_t thisTimer = 0;

        while ( channel[channelNumber].timer[thisTimer].time * 1000U < milliSecondsToday )
        {
          thisTimer++;
        }

        float newPercentage;

        /* only do a lot of math if really neccesary */
        if ( channel[channelNumber].timer[thisTimer].time != channel[channelNumber].timer[thisTimer - 1].time )
        {
          newPercentage = mapFloat( milliSecondsToday,
                                    channel[channelNumber].timer[thisTimer - 1].time * 1000U,
                                    channel[channelNumber].timer[thisTimer].time * 1000U,
                                    channel[channelNumber].timer[thisTimer - 1].percentage,
                                    channel[channelNumber].timer[thisTimer].percentage );
        }
        else
        {
          /* timers are equal so no math neccesary */
          newPercentage = channel[channelNumber].timer[thisTimer].percentage;
        }

        /* check if channel has a minimum set */
        if ( newPercentage < channel[channelNumber].minimumLevel )
        {
          newPercentage = channel[channelNumber].minimumLevel;
        }

        /* done, set the channel */
        channel[channelNumber].currentPercentage = newPercentage;
        ledcWrite( channelNumber, mapFloat( channel[channelNumber].currentPercentage,
                                            0,
                                            100,
                                            0,
                                            ledcMaxValue ) );
      }
    }
    //Serial.println( micros() - startTimer );
    vTaskDelayUntil( &xLastWakeTime, dimmerTaskdelayTime / portTICK_PERIOD_MS );
  }
}
