vinteo / hass-opensprinkler

OpenSprinkler Integration for Home Assistant
MIT License
204 stars 40 forks source link

Service to set rain delay #251

Closed vinteo closed 8 months ago

vinteo commented 11 months ago

pyopensprinkler has the controller function:

https://github.com/vinteo/py-opensprinkler/blob/master/pyopensprinkler/__init__.py#L372-L380

noctividus commented 8 months ago

It would be great if we could get this implemented.

The advantage of using a rain delay is that it is temporary. Currently, I use an automation to disable open sprinkler in the event of forecast rain. When that forecast clears, I use a second automation to re-enable open sprinkler.

This isn't ideal, because if HomeAssistant misses the second event, my OpenSprinkler can remain disabled for some time.

If we had the ability to set a rain delay, then I could set a rain delay for 2 days, opensprinkler would automatically re-enable and I wouldn't have to worry about a second automation.

curlydingo commented 8 months ago

Happy to give it a go, just getting a dev environment set up now.

curlydingo commented 8 months ago

I have it "working" but ran into a bit of trouble, please see draft pull request for details.

vinteo commented 8 months ago

Done in v1.2.6 (#269), thanks @curlydingo