-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a DataUpdateCoordinator to Hydrawise. #92305
Conversation
Hey there @ptcryan, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments
except (ConnectTimeout, HTTPError) as ex: | ||
_LOGGER.error("Unable to connect to Hydrawise cloud service: %s", str(ex)) | ||
LOGGER.error("Unable to connect to Hydrawise cloud service: %s", str(ex)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove logger and persistent notification and raise ConfigEntryNotReady
|
||
async def _async_update_data(self): | ||
"""Fetch the latest data from Hydrawise.""" | ||
result = await self.hass.async_add_executor_job(self.api.update_controller_info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like we use the coordinator to fetch any data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does. The update_controller_info()
method caches the data inside the api
object. (Not how I would have designed the API, but it's what I'm working with)
I can pull out the relevant data if you really want me to, but I also want to replace the API eventually with https://github.com/dknowles2/pydrawise/ which uses the newer GraphQL version of the Hydrawise service. The data returned by that API will be vastly different than this one, so I'd rather not create more work for myself later.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
…2313) * Retry onvif setup when it is unexpectedly cancelled fixes home-assistant#92308 * Retry onvif setup when it is unexpectedly cancelled fixes home-assistant#92308
home-assistant#92312) * Reduce size of migration transactions to accommodate slow/busy systems related issue home-assistant#91489 * handle overloaded RPIs better
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* db_url fix * Add test * assert entry.options
Co-authored-by: Franck Nijhof <git@frenck.dev>
* Migrate unique IDs of Rituals Perfume Genie * Fix doc string
* Bump bluetooth-auto-recovery to 1.1.0 https://github.com/Bluetooth-Devices/bluetooth-auto-recovery/releases/tag/v1.1.0 In home-assistant/operating-system#2485 is was discovered that a more aggressive reset strategy is needed due to a yet unsolved bug in the linux 6.1.x kernel series * bump to 1.1.1 since event 47 cannot be decoded (newer kernels only)
* Migrate cloud settings for all Alexa entities * Also set settings for unknown entities
…nt#92450) Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Fix lingering timer in lifx * Remove duplicate code
Ah crap, I screwed up my branch trying to remerge. I'm going to close this and send a clean version. (One day I'll figure out how to use git properly) |
Proposed change
This adds a
DataUpdateCoordinator
to the Hydrawise integration.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: