The upstream pyrainbird library appears to support stopping zones, getting the status of the irrigation system (if it is currently watering), and other services that are really useful to create a full irrigation controller in HA.
Right now I can’t tell if the system is running once I start it with the service and I can’t stop it if there is a need to.
Please implement these features in HA to make this a super useful integration.
The switch doesn’t change state when I start a zone with the start irrigation service. So it doesn’t ‘turn on’ for me to turn it off or check that it’s on.
“The integration has a configuration option to change the default amount of time that the irrigation will run when turning on a zone switch (default is 6 minutes). This can be overridden with a service call (see below).”
However, I would like dynamic run times so I can’t really use the switch. So I use the service call.
It actually uses that, but the integraiton is local polling, meaning it relies on the polling frequency. Which is probably 30 seconds. Which is 1 minute. You’re not being patient, it will react to the zone state changes within 59 seconds.
If you want to increase the polling frequency, make an automation using homeassistant.update_entity while supplying one of the switches. It will update all entities in the integration.
TLDR: The integration already uses the zone state and status of the irrigation system, you just have to wait for the state to be polled.
Ha, to conserve water I only tested for 1 minute! HA is so quick I just got used to fast updates. I’ll retest next week and make sure it works as I expect it to. Thank you!
And 1 minute should fine considering I run it longer than that normally.
Jumping into this a couple of days late. I wanted to do a test of the various zones on my system to check for damaged sprinkler heads, and instead of using the Rainbird app with the quick water I decided to use HA.
What I found is if I toggle the desired zone on, the zone will come on but the HA switch will automatically return to the off state, while the zone remains on. If I toggle the switch back on and then off, the zone will turn off. Thus the state of the switch in HA is not in sync with the rainbind controller (I haven’t checked the toggle states when the system is on automatic, so I can’t say if they show when the zones are on then)
Just a minor annoyance, but it may explain what @hassbrad is seeing. Thus this might me worth a bug report more than a feature request.
Ok, the switches do reflect the current state, but only after the full 1 minute polling update interval. So I can start a zone with the service call and then I just have to wait a minute for the zone switch to show it’s running. Then I can immediately stop the zone with the switch. Everything works as it should except for that darn delay…but that is fine for an irrigation system. Thanks for your help!
I understand this has been marked as solved, however, since the op is regarding implementing the full suite of features in the pyrainbird library, I figured I’d post here before starting a new topic.
Is there a road map for implementing some of the other capabilities this library? There are quite a number of other methods and data classes that would make the Rainbird integration far more robust and help augment the somewhat lacking capabilities of the Rainbird controllers themselves.
Some of the methods I would love to see are as follows:
set_program
advance_zone
get_weather_and_status
get_weather_adjustment_mask