Add autoclose of the solenoid when the soil moisture has reached the set level

This commit is contained in:
lejubila
2021-08-28 11:38:05 +02:00
parent 2001b09937
commit 81ce03e90a
4 changed files with 59 additions and 6 deletions

View File

@@ -90,7 +90,7 @@ function close_all_for_rain {
local al=${!a}
ev_status $al
local state=$?
local moisture=$(ev_check_moisture $i)
local moisture=$(ev_check_moisture_autoclose $i)
if [ "$state" = "1" ] && [ "$moisture" -gt 0 ]; then
ev_close $al
log_write "irrigate" "warning" "close_all_for_rain - Close solenoid '$al' because maximum soil moisture has been reached"