Skip to content
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

Improve/correct async loading of Version #249

Merged
merged 7 commits into from
Aug 8, 2024
4 changes: 2 additions & 2 deletions custom_components/zha_toolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ async def async_setup(hass, config):
return True

LOGGER.debug("Setup services from async_setup")
register_services(hass)
await register_services(hass)

return True

Expand Down Expand Up @@ -705,7 +705,7 @@ async def toolkit_service(service):
LOGGER.debug("module is %s", module)
importlib.reload(u)

currentVersion = hass.async_add_executor_job(u.getVersion)
currentVersion = await u.getVersion()
if currentVersion != LOADED_VERSION:
LOGGER.debug(
"Reload services because VERSION changed from %s to %s",
Expand Down
Loading