[SOLVED] Sprinkler control: one or both of two conditions to prevent watering
-
I think I'm just staring at this too hard so I'm opening up to the collective.
Scenario: water the gardens at XX time unless one or both of the following are
TRUE
:- More than .25" of rain has fallen yesterday (I have an entity for this)
- It is currently raining (I have an entity for this)
I had it set to
OR
and that (obviously) doesn't work because, whilst first bullet wasTRUE
second bullet wasFALSE
and so the water flowed.I'm thinking, atm, of something using
Reaction
>Group
and building out something that isolates the conditions vs making them anOR
.Am I on the right path here?
-
In staring even harder I came up with this:
Since image functionality is STILL BROKEN on this forum (but, oh, it LOOKS pretty)...
Triggers not or
Comment: This is a NOT rule. If either of these conditions are NOT true then this rule is FALSE. (If the rainfall total either yesterday or today is more than 1/4" then FALSE).
Entity Attribute: Weatherflow Precipitation Yesterday (hass>sensor_weatherflow_precipitation_yesterday) value_sensor.value <= 0.25
OR Entity Attribute: Weatherflow Precipitation Today (hass>sensor_weatherflow_precipitation_today) value_sensor.value <= 0.25
Currently, there was 1.61" of rain yesterday so the outcome is
false
and there has been no rain today so that outcome istrue
- as such the ruleset is renderedfalse
.Is my thinking sound here?
-
So basically the way you have your rule structured right now is that the group will go
true
either when it rains more than 0.25"or
its currently raining. Which is the opposite of what you'd want. As you mentioned in your recent post switching this to anot or
operator should fix it. Meaning the group will be true if it hasn't rained more than 0.25" yesterday or is currently raining. -
@Pabla Thanks!
I altered the premise very slightly to be rain amounts on both days because, hey, it might be actually raining right then but it might be a very slight passing shower which doesn't end up providing the needed water amount.
The updated version looks at amounts on both days, instead.
-
@Pabla Hmmm. We've had a sudden storm that has dropped 2" of rain today. As such both Conditions are now
false
and then ruleset has goneSET
.SO... testing, when I flip the criteria of the Conditions to
>= .25
both gotrue
and the ruleset goesfalse
.I did a quick test and, yes, it appears by bumping one of the two Conditions to be silly high like 5" (so today's actual is less than that) it makes one Condition
true
and onefalse
and the ruleset remains as unset. Bumping both to be silly high (so both actuals are less than that) makes the ruleset toggle toSET
which is the desired outcome. Any or both of the Conditions beingTRUE
toggles the ruleset unset. Both conditions beingfalse
toggles the rulesetTRUE
.The expectation is that tomorrow morning there will be no flow of water as at least today's Condition is
true
so no matter what tomorrow's is (between midnight and 0600 ET) this ruleset will notSET
. -
@gwp1 I am not sure I am quite following. Are you saying that when both conditions: Rain amount yesterday and Rain amount today are true (meaning a certain amount of rain has fallen either yesterday or today) that the ruleset still goes true and waters the garden?
-
@gwp1 said in [SOLVED] Sprinkler control: one or both of two conditions to prevent watering:
Any or both of the Conditions being TRUE toggles the ruleset unset. Both conditions being false toggles the ruleset TRUE.
So the settings are as such now:
Triggers [not or]
Entity Attribute: Weatherflow Precipitation Yesterday (hass>sensor_weatherflow_precipitation_yesterday) value_sensor.value >= 0.25
OR Entity Attribute: Weatherflow Precipitation Today (hass>sensor_weatherflow_precipitation_today) value_sensor.value >= 0.25
Right now the first one is
true
and the second isfalse
. As such, the rule isRESET
. Unless we get rain between now and tomorrow morning, the "yesterday" will roll off and "today" will become "yesterday" and both Conditions will be befalse
and the rule will change toSET
and the water will flow. -
Ah I see but isn't that what you'd expect? Say yesterday you got over 0.25 (inches?) of rain and today you got 0.23. This would mean your garden will not be watered.
Lets say no rain falls between today and tomorrow. That means when tomorrow rolls over yesterdays rain total now becomes 0.23 and todays is 0. Based on that info you'd want your garden to be watered.
To me the ruleset is working as intended, if you still wouldn't want it to water I would set your "todays" threshold a little lower.
-
4/10