fix setting custom min value

This commit is contained in:
MichaelDvP
2022-10-17 10:11:18 +02:00
parent dbb2a365cb
commit 3e3e7156ec

View File

@@ -340,7 +340,7 @@ bool DeviceValue::get_custom_min(int16_t & val) {
if (fahrenheit) { if (fahrenheit) {
v = (v - (32 * (fahrenheit - 1))) / 1.8; // reset to °C v = (v - (32 * (fahrenheit - 1))) / 1.8; // reset to °C
} }
if (v > max) { if (max > 0 && v > max) {
return false; return false;
} }
val = v; val = v;