I’ve installed HA and also installed Sonoff Lan to control my eWelink micro controller that triggers solenoids to come on for a small duration on various times of the day.
I would like to automate this so that it does not come on the day and the next day if it is predicted to rain the next day.
Maybe there is already a topic on this but I tried looking for one and could not find it.
Wouldn’t it be better to use real data instead of predictions? I live in an area where rain-prediction is horrible and this may lead to no irrigation for days even if no rain.
Why not measure actual rainfall and based on current-rain or last-rain-datetime…do nothing for xyx hours?
EDIT: you could also try to install moisture sensors and base it on that?
Thank you so much for replying. I tried using moisture sensors and found that they are less reliable than rain-prediction (I live in Melbourne).
You are absolutely right and I am glad I brought this up here as I was thinking differently from you. Yes I should be measuring actual current rainfall and base my actions based on that.
Is there any previous discussion here on how this can be achieved?
Once again, thanks heaps for changing my line of thought.
Understood but that may be less easy than you think.
The forecast may have entries alike (per hour) rain - no rain - lot of rain - no rain…etc.
How to choose your actions based on that? Example, if the first ‘hit’ is rain and then many hours of no rain, then this may actually be interpreted as ‘no rain’. I know I am not making it easy but trying to find out with what you are happy (enough) with. I have no clue if Met. no provides mm (inch) rainfall predicitons?
EDIT: a rain sensor can also be a simple water-leak sensor that registers ‘water’ and you could even place/glue it in a glass/cup on a certain height so that it only triggers from a minimum amount of rain.
So what you could do is measure the predicted future rainfall, alike this (I am no jinja expert so this may be done in a nicer way)
{% set fc = state_attr('weather.forecast_home_3','forecast') %}
{% set ns = namespace(total=0) %}
{% for i in range(0,fc|count) %}
{% set ns.total = ns.total + fc[i].precipitation %}
{% endfor %}
{{ns.total}}
for Melbourne this now gives (me) 4.8 mm
If you create a template sensor with that, you can then use the forecasted mm to steer your irrigation.
with the state of above sensor you can run an automation that triggers the valves for a specific length…that is something you have to define yourselves