Fix: If no sunset/sunrise calculation is possible a wrong value is shown

This is catched now and a proper message is shown in the web UI. Also the mode is set to day.
This commit is contained in:
Thomas Basler
2023-06-01 18:39:50 +02:00
parent aa4868cd9c
commit 5a37948ca9
8 changed files with 44 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ public:
void loop();
bool isDayPeriod();
bool isSunsetAvailable();
bool sunsetTime(struct tm* info);
bool sunriseTime(struct tm* info);
@@ -20,6 +21,7 @@ private:
SunSet _sun;
bool _isDayPeriod = true;
bool _isSunsetAvailable = true;
uint _sunriseMinutes = 0;
uint _sunsetMinutes = 0;