diff --git a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h
index 6a37f475..cf57fff2 100644
--- a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h
+++ b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h
@@ -108,16 +108,21 @@ private:
uint8_t hr = hour(localTime);
uint8_t mi = minute(localTime);
- if (sunrise==0 || sunset==0) return false;
-
- if (hour(sunrise)>hr && hour(sunset)
mi) {
+ DEBUG_PRINTF("--Time: %02d:%02d\n", (int)hr, (int)mi);
+ if (sunrise && sunset) {
+ DEBUG_PRINTLN(F("--Sunrise & sunset detected."));
+ if (hour(sunrise)>hr && hour(sunset)
mi) {
+ isDayTime = true;
+ DEBUG_PRINTLN(F("--It is daytime."));
+ }
}
}
return isDayTime;
diff --git a/wled00/wled.h b/wled00/wled.h
index 31ac3fa3..506a08c4 100644
--- a/wled00/wled.h
+++ b/wled00/wled.h
@@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
-#define VERSION 2105101
+#define VERSION 2105111
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG