   if (!isTimeNow(lastSunSetUpdate, sunSetUpdateInterval)) {
     return;
   }
-  unsigned long currentMillis = millis();
-  unsigned long delta = static_cast<unsigned long>(currentMillis - millisAtStartOfSunSet);
-  unsigned long finalMillis = defaultSunSetDelta;
+  uint32_t currentMillis = millis();
+  uint32_t delta = static_cast<uint32_t>(currentMillis - millisAtStartOfSunSet);
+  uint32_t finalMillis = defaultSunSetDelta;
   finalMillis *= 60;
   finalMillis *= 1000;
   if (delta > finalMillis) {

  sunSetActive = true;
  turnLightOn();
  waitForButtonDepress(OffButton, HIGH);
  unsigned long modeActive = millis();
  bool normalExit = true;
  while (debounceDigitalRead(OffButton) == LOW) {
    int16_t encoderDelta = encoder->getValue();

{
  for (uint8_t i = 0 ; i < 3 ; ++i)
  {
    targetColor[i] = tungsten100W[i];
  }
  minRGBLevel = computeMinRGBLevel(targetColor);
  totalDimmerSteps = minRGBLevel * NUM_LED;
