diff --git a/custom_components/hacs/base.py b/custom_components/hacs/base.py index 28816999fb3..210c41db774 100644 --- a/custom_components/hacs/base.py +++ b/custom_components/hacs/base.py @@ -599,7 +599,7 @@ async def async_register_repository( repository.data.id = repository_id else: - if self.hass is not None and ((check and repository.data.new) or self.status.new): + if self.hass is not None and check and repository.data.new: self.async_dispatch( HacsDispatchEvent.REPOSITORY, { @@ -887,15 +887,6 @@ async def async_get_category_repositories_experimental(self, category: str) -> N repository.repository_manifest.update_data( {**dict(HACS_MANIFEST_KEYS_TO_EXPORT), **manifest} ) - self.async_dispatch( - HacsDispatchEvent.REPOSITORY, - { - "id": 1337, - "action": "update", - "repository": repository.data.full_name, - "repository_id": repository.data.id, - }, - ) if category == "integration": self.status.inital_fetch_done = True @@ -912,6 +903,16 @@ async def async_get_category_repositories_experimental(self, category: str) -> N ) self.repositories.unregister(repository) + self.async_dispatch( + HacsDispatchEvent.REPOSITORY, + { + "id": 1337, + "action": "update", + "repository": repository.data.full_name, + "repository_id": repository.data.id, + }, + ) + async def async_get_category_repositories(self, category: HacsCategory) -> None: """Get repositories from category.""" if self.system.disabled: