Commit 6429998f authored by Cédric Crettaz's avatar Cédric Crettaz 🖥

Update app.py for the correct range of moisture.

parent 05d513b5
......@@ -324,7 +324,7 @@ def _conv_micro_volts_to_moisture(micro_volts):
if micro_volts == 0:
return 0
return int((micro_volts * 239) / 10000)
return int(239 - ((micro_volts * 239) / 10000))
def _conv_micro_volts_to_battery_level(micro_volts):
"""Battery is 0-12v
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment