From b02e3c0ac72b657913f1cdc2c308ac4e440f5c9a Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Tue, 28 Jan 2025 05:49:12 -0800 Subject: [PATCH] maint: Update HACS to 2.0.5 --- custom_components/hacs/hacs_frontend/entrypoint.js | 2 +- custom_components/hacs/hacs_frontend/version.py | 2 +- custom_components/hacs/manifest.json | 2 +- custom_components/hacs/repositories/base.py | 3 --- custom_components/hacs/repositories/plugin.py | 8 +++++++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/custom_components/hacs/hacs_frontend/entrypoint.js b/custom_components/hacs/hacs_frontend/entrypoint.js index c03b701..53f6c4a 100644 --- a/custom_components/hacs/hacs_frontend/entrypoint.js +++ b/custom_components/hacs/hacs_frontend/entrypoint.js @@ -1 +1 @@ -!function(){function n(n){var e=document.createElement("script");e.src=n,document.body.appendChild(e)}if(/.*Version\/(?:11|12)(?:\.\d+)*.*Safari\//.test(navigator.userAgent))n("/hacsfiles/frontend/frontend_es5/entrypoint.W8HpFKTV-jg.js");else try{new Function("import('/hacsfiles/frontend/frontend_latest/entrypoint.3UR5SnLC394.js')")()}catch(e){n("/hacsfiles/frontend/frontend_es5/entrypoint.W8HpFKTV-jg.js")}}() \ No newline at end of file +!function(){function n(n){var e=document.createElement("script");e.src=n,document.body.appendChild(e)}if(/.*Version\/(?:11|12)(?:\.\d+)*.*Safari\//.test(navigator.userAgent))n("/hacsfiles/frontend/frontend_es5/entrypoint.c180d0b256f9b6d0.js");else try{new Function("import('/hacsfiles/frontend/frontend_latest/entrypoint.bb9d28f38e9fba76.js')")()}catch(e){n("/hacsfiles/frontend/frontend_es5/entrypoint.c180d0b256f9b6d0.js")}}() \ No newline at end of file diff --git a/custom_components/hacs/hacs_frontend/version.py b/custom_components/hacs/hacs_frontend/version.py index b798136..c00d5ff 100644 --- a/custom_components/hacs/hacs_frontend/version.py +++ b/custom_components/hacs/hacs_frontend/version.py @@ -1 +1 @@ -VERSION="20240903140523" \ No newline at end of file +VERSION="20250128065759" \ No newline at end of file diff --git a/custom_components/hacs/manifest.json b/custom_components/hacs/manifest.json index 23705e3..1ca2f24 100644 --- a/custom_components/hacs/manifest.json +++ b/custom_components/hacs/manifest.json @@ -22,5 +22,5 @@ "requirements": [ "aiogithubapi>=22.10.1" ], - "version": "2.0.2" + "version": "2.0.5" } \ No newline at end of file diff --git a/custom_components/hacs/repositories/base.py b/custom_components/hacs/repositories/base.py index 8e1caf9..c5470d7 100644 --- a/custom_components/hacs/repositories/base.py +++ b/custom_components/hacs/repositories/base.py @@ -927,9 +927,6 @@ class HacsRepository: raise HacsException("repository.content.path.local is None") self.validate.errors.clear() - if not self.can_download: - raise HacsException("The version of Home Assistant is not compatible with this version") - version_to_install = version or self.version_to_download() if version_to_install == self.data.default_branch: self.ref = version_to_install diff --git a/custom_components/hacs/repositories/plugin.py b/custom_components/hacs/repositories/plugin.py index 86e30f9..190abc5 100644 --- a/custom_components/hacs/repositories/plugin.py +++ b/custom_components/hacs/repositories/plugin.py @@ -172,6 +172,7 @@ class HacsPluginRepository(HacsRepository): def _get_resource_handler(self) -> ResourceStorageCollection | None: """Get the resource handler.""" + resources: ResourceStorageCollection | None if not (hass_data := self.hacs.hass.data): self.logger.error("%s Can not access the hass data", self.string) return @@ -180,7 +181,12 @@ class HacsPluginRepository(HacsRepository): self.logger.warning("%s Can not access the lovelace integration data", self.string) return - resources: ResourceStorageCollection | None = lovelace_data.get("resources") + if self.hacs.core.ha_version > "2025.1.99": + # Changed to 2025.2.0 + # Changed in https://github.com/home-assistant/core/pull/136313 + resources = lovelace_data.resources + else: + resources = lovelace_data.get("resources") if resources is None: self.logger.warning("%s Can not access the dashboard resources", self.string)