allow disable light voltage range with -1

This commit is contained in:
Your Name 2021-12-02 14:40:06 +01:00
parent c5bce25afe
commit d7b854da75

View File

@ -740,7 +740,7 @@ void safeSetup()
{ return (candidate > 0) && (candidate < (24)); }); { return (candidate > 0) && (candidate < (24)); });
timedLightOnlyWhenDark.setDefaultValue(true); timedLightOnlyWhenDark.setDefaultValue(true);
timedLightVoltageCutoff.setDefaultValue(3.8).setValidator([](double candidate) 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 #endif // TIMED_LIGHT_PIN
Homie.setLoopFunction(homieLoop); Homie.setLoopFunction(homieLoop);