From d7b854da75e772b43768e162a9a49dee8dcf6a6a Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 2 Dec 2021 14:40:06 +0100 Subject: [PATCH] allow disable light voltage range with -1 --- esp32/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp32/src/main.cpp b/esp32/src/main.cpp index 918f310..a52ad89 100644 --- a/esp32/src/main.cpp +++ b/esp32/src/main.cpp @@ -740,7 +740,7 @@ void safeSetup() { return (candidate > 0) && (candidate < (24)); }); timedLightOnlyWhenDark.setDefaultValue(true); timedLightVoltageCutoff.setDefaultValue(3.8).setValidator([](double candidate) - { return (candidate > 3.3) && (candidate < (4.2)); }); + { return ((candidate > 3.3 || candidate == -1) && (candidate < (50))); }); #endif // TIMED_LIGHT_PIN Homie.setLoopFunction(homieLoop);