From e6589695dfc1ec0c653b93030ab122dcd0503402 Mon Sep 17 00:00:00 2001 From: WolffRuoff Date: Sun, 8 Mar 2026 14:46:30 -0400 Subject: [PATCH 1/3] ci: add hassfest validation job Adds `home-assistant/actions/hassfest@master` as a required CI job. HACS publishing requires both hacs/action and hassfest to pass. Also adds hassfest to the release job's needs list. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 144fa3b..75f68f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,12 @@ jobs: with: category: integration + hassfest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: home-assistant/actions/hassfest@master + test: runs-on: ubuntu-latest steps: @@ -56,7 +62,7 @@ jobs: release: if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' - needs: [validate-hacs, test, build-frontend] + needs: [validate-hacs, hassfest, test, build-frontend] runs-on: ubuntu-latest steps: - name: Checkout From 7f9c402e5c40f8e2e7deb4388d3bf6c3f073f8e1 Mon Sep 17 00:00:00 2001 From: WolffRuoff Date: Sun, 8 Mar 2026 14:50:18 -0400 Subject: [PATCH 2/3] fix: declare http dependency and remove redundant async_setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add http to manifest.json dependencies to satisfy hassfest validation for the StaticPathConfig/hass.http usage. Remove async_setup() since its setdefault call is redundant — async_setup_entry handles dict init. Co-Authored-By: Claude Sonnet 4.6 --- custom_components/package_tracker/__init__.py | 8 +------- custom_components/package_tracker/manifest.json | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/custom_components/package_tracker/__init__.py b/custom_components/package_tracker/__init__.py index 0ce7e40..b5050d0 100644 --- a/custom_components/package_tracker/__init__.py +++ b/custom_components/package_tracker/__init__.py @@ -7,7 +7,6 @@ from homeassistant.components.http import StaticPathConfig from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant -from homeassistant.helpers.typing import ConfigType from .const import CONF_SCRAPER_URL, DEFAULT_SCRAPER_URL, DOMAIN from .coordinator import PackageTrackerCoordinator @@ -16,12 +15,6 @@ PLATFORMS = ["sensor"] -async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: - """Set up the Package Tracker component.""" - hass.data.setdefault(DOMAIN, {}) - return True - - async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Set up Package Tracker from a config entry.""" scraper_url = entry.data.get(CONF_SCRAPER_URL, DEFAULT_SCRAPER_URL) @@ -29,6 +22,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: await coordinator.async_config_entry_first_refresh() + hass.data.setdefault(DOMAIN, {}) hass.data[DOMAIN][entry.entry_id] = coordinator # Register frontend static path for the Lovelace card diff --git a/custom_components/package_tracker/manifest.json b/custom_components/package_tracker/manifest.json index d95d9f2..e427595 100644 --- a/custom_components/package_tracker/manifest.json +++ b/custom_components/package_tracker/manifest.json @@ -7,5 +7,6 @@ "codeowners": [], "config_flow": true, "iot_class": "cloud_polling", - "requirements": [] + "requirements": [], + "dependencies": ["http"] } From e4f4e809fd47b2557a4fca5dbbf29dbd52c289ff Mon Sep 17 00:00:00 2001 From: WolffRuoff Date: Sun, 8 Mar 2026 15:21:10 -0400 Subject: [PATCH 3/3] fix: sort manifest.json keys per hassfest requirements Keys must be: domain, name, then alphabetical order. Co-Authored-By: Claude Sonnet 4.6 --- custom_components/package_tracker/manifest.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/package_tracker/manifest.json b/custom_components/package_tracker/manifest.json index e427595..6ee138f 100644 --- a/custom_components/package_tracker/manifest.json +++ b/custom_components/package_tracker/manifest.json @@ -1,12 +1,12 @@ { "domain": "package_tracker", "name": "Package Tracker", - "version": "2.7.2", - "documentation": "https://github.com/WolffRuoff/package_tracker", - "issue_tracker": "https://github.com/WolffRuoff/package_tracker/issues", "codeowners": [], "config_flow": true, + "dependencies": ["http"], + "documentation": "https://github.com/WolffRuoff/package_tracker", "iot_class": "cloud_polling", + "issue_tracker": "https://github.com/WolffRuoff/package_tracker/issues", "requirements": [], - "dependencies": ["http"] + "version": "2.7.2" }