dknowles2 / pydrawise

Asynchronous Python 3 library for interacting with Hydrawise sprinkler controllers through the GraphQL API
https://pydrawise.readthedocs.io/
Apache License 2.0
2 stars 4 forks source link

Planning of Home Assistant Integration #33

Closed smoki3 closed 3 months ago

smoki3 commented 1 year ago

Hi,

I saw you are planning to integrate pydrawise into HA Core. Do you have any plan to release a HACS custom integration for this? Because I think until they approve the new code it will take much time...

dknowles2 commented 1 year ago

I considered it, but getting it integrated back into core will be difficult if I go that route.

I'm planning to start working on this again this week; I've been distracted with real-life stuff lately. :-)

jjhuff commented 1 year ago

Let me know when you're ready for a tester. I have a Pro-HC setup with a flow meter that I'd love to monitor!

dknowles2 commented 1 year ago

Okay, so here's the current status:

Config flow was finally merged, which allowed me to add devices. In 2023.10, the Hydrawise integration will finally look more like a modern integration.

I've got a PR pending to add more tests to the integration, and once that's merged, I have another fix for entities not loading their state until the first refresh.

I added another implementation of the legacy API that has the same interface as my new GraphQL client, and I have pending changes to update the integration to use that. One that's done, there's one more PR to migrate to the new GraphQL client that uses a different auth method. I got that working this morning, but still need to update tests.

Assuming PRs get merged quickly from now on, I think this could all land before the 2023.11 release, but I've got a bunch of other stuff going on in October, so I wouldn't be surprised if it slips to the 2023.12 release.

Once all this lands, we can start adding new features and fixing other weird stuff. Top of mind for me:

Anything else folks are thinking about?

smoki3 commented 1 year ago

I am tracking this process and already using the config flow. Working fine so far.

I agree completly with your plan.

For me its important to fix the active suspension sensor. Because it always show "in 2 years".

Regarding the "automatic watering switch": Does the API differentiate between manual and automatic watering? If yes then it would be fine to have automatic watering as an sensor which shows if a watering is running or not.

Is there a "status per zone" in the API? To see if the zone is suspending or in automatic mode? Would be also nice to have this as an sensor and control it as you mentioned with services.

Regarding the numer entity I also have some doubt. It would be nice to just control the manual watering time without changing the automation. Also a service would be nice to set "manual water for xx minutes".

The last point is to make the refresh time configurable if the new api allows more requests

What do you think are these point possible?

thomaskistler commented 11 months ago

Do you still need examples of API responses with flow sensors?

dknowles2 commented 3 months ago

I think this is now resolved. Feel free to open separate issues for anything else that's missing.