MCPcopy
hub / github.com/hacs/integration / async_install

Method async_install

custom_components/hacs/repositories/base.py:876–894  ·  view source on GitHub ↗

Run install steps.

(self, *, version: str | None = None, **_)

Source from the content-addressed store, hash-verified

874 self.logger.info("%s Pre installation steps completed", self.string)
875
876 async def async_install(self, *, version: str | None = None, **_) -> None:
877 """Run install steps."""
878 await self._async_pre_install()
879 self.hacs.async_dispatch(
880 HacsDispatchEvent.REPOSITORY_DOWNLOAD_PROGRESS,
881 {"repository": self.data.full_name, "progress": 30},
882 )
883 self.logger.info("%s Running installation steps", self.string)
884 await self.async_install_repository(version=version)
885 self.hacs.async_dispatch(
886 HacsDispatchEvent.REPOSITORY_DOWNLOAD_PROGRESS,
887 {"repository": self.data.full_name, "progress": 90},
888 )
889 self.logger.info("%s Installation steps completed", self.string)
890 await self._async_post_install()
891 self.hacs.async_dispatch(
892 HacsDispatchEvent.REPOSITORY_DOWNLOAD_PROGRESS,
893 {"repository": self.data.full_name, "progress": False},
894 )
895
896 async def async_post_installation(self) -> None:
897 """Run post install steps."""

Callers 2

Calls 4

_async_pre_installMethod · 0.95
_async_post_installMethod · 0.95
async_dispatchMethod · 0.80

Tested by 1