apiservice/soil/moisture: Fix: correct equation for soil moisture

calculation

Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
2025-08-15 08:59:23 +02:00
parent 8f0fd525d9
commit d6d09abe9f

View File

@@ -82,7 +82,7 @@ func moisture() (types.Telemetry, error) {
// re-calculate to % // re-calculate to %
// 100 % := 3.0 V // 100 % := 3.0 V
// 0 % := 0.0 V // 0 % := 0.0 V
ret.Value = -0.03*ret.Value + 3 ret.Value = -33.333*ret.Value + 100
ret.Unit = "%" ret.Unit = "%"
return ret, nil return ret, nil
} }