Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions custom_components/package_tracker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,19 +15,14 @@
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)
coordinator = PackageTrackerCoordinator(hass, entry, scraper_url)

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
Expand Down
9 changes: 5 additions & 4 deletions custom_components/package_tracker/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +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",
"requirements": []
"issue_tracker": "https://github.com/WolffRuoff/package_tracker/issues",
"requirements": [],
"version": "2.7.2"
}