Possible to use previoustate in rules ?
Posted: 10 Jan 2019, 17:48
Hi Chaps,
ESPeasy is monitoring my rain water tanks and controlling 2 latching solenoid valves - one on tank supply to house and another on the council water feed.
I use the rules below but the solenoids are pulsed every few seconds even if their state does not need to change.
Is there a "previousstate" type command that can be used in rules to disable the rule unless the solenoid needs to change state ?
Cheers
ESPeasy is monitoring my rain water tanks and controlling 2 latching solenoid valves - one on tank supply to house and another on the council water feed.
I use the rules below but the solenoids are pulsed every few seconds even if their state does not need to change.
Code: Select all
On WaterLevel#Litres>10 do
gpio,13,1 //status LED
gpio,14,0 // status LED
Pulse,4,1,500 // pulse solenoid valve 1
endon
On WaterLevel#Litres<10 do
gpio,14,1
gpio,13,0
Pulse,5,1,500 // pulse solenoid valve 2
endon
Cheers