sprinkler - small fix

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-25 18:05:26 +03:00
parent 7e7abce6b6
commit 1c839091b6
3 changed files with 4 additions and 4 deletions

View File

@@ -207,7 +207,7 @@ mqtt:
payload_not_available: "disconnected"
- name: "Полив водопровод"
state_topic: "edem/s_out/sprinkler/$vIN"
state_topic: "edem/s_out/sprinkler/$rVIN"
availability_topic: "edem/air/$state"
payload_available: "ready"
payload_not_available: "disconnected"

View File

@@ -204,7 +204,7 @@ root/s_out/sprinkler/$wMin - ON/OFF достигнут минимум воды
root/s_out/sprinkler/$rDren - ON/OFF включено реле дренажного насоса
root/s_out/sprinkler/$rPump - ON/OFF включено реле основного насоса
root/s_out/sprinkler/set - значение счетчика воды (восстанавливается при перезагрузке из данного топика)
root/s_out/sprinkler/$vIN - ON/OFF - признак открытия клапана налива бака из водопровода
root/s_out/sprinkler/$rVIN - ON/OFF - признак открытия клапана налива бака из водопровода
root/s_out/sprinkler/garden/set - требуемый обьем (или время) полива зоны
root/s_out/sprinkler/garden/cmd - ON или OFF - признак включения полива зоны
@@ -223,7 +223,7 @@ sensor:
state_topic: "root/s_out/sprinkler/$wMin"
- name: "Полив водопровод"
state_topic: "root/s_out/sprinkler/$vIN"
state_topic: "root/s_out/sprinkler/$rVIN"
- name: "Полив дренаж вкл"
state_topic: "root/s_out/sprinkler/$rDren"

View File

@@ -672,7 +672,7 @@ int out_sprinkler::Poll(short cause)
else
{
uint32_t flowTimer = (uint32_t)getIntFromJson(gatesObj, "@flowTimer", now);
if (isTimeOver(flowTimer, now, 1000UL))
if (isTimeOver(flowTimer, now, 1000UL) && setVal > 0)
{
updateZoneValue(currentZone, 1);
setValToJson(gatesObj, "@flowTimer", (long)now);