Custom Home Assistant integration that keeps your dashboards up to date with arrivals and departures from the official Avinor data feed.
Data source: Flydata fra Avinor – https://partner.avinor.no/tjenester/flydata/
- Overview
- Repository Structure
- Features
- Installation
- Configuration
- Known Limitations
- Flight Details (Airlabs)
- Companion Lovelace Card
- Example Dashboard Card
- Troubleshooting
- Release Notes
- Attribution
- Polls Avinor's API on a recommended three-minute cadence and exposes the results as Home Assistant sensors.
- Includes Norwegian and English translations so the integration fits natively into your UI.
- Ships with tests that validate API parsing, helping future contributors keep behaviour stable.
custom_components/avinor_flight_data/– Home Assistant integration package.docs/assets/example_afd.png– Example Lovelace card screenshot used in documentation.tests/– Unit tests covering the API parsing logic.
Integration
- Select from 300+ airports using a searchable dropdown.
- Choose arrivals or departures per sensor instance and control the time window (default: -1/+7 hours).
- Automatic refresh every three minutes, aligned with Avinor guidance.
Lovelace Card (separate repository)
- Responsive table layout that hides irrelevant columns for arrivals.
- Converts UTC timestamps to local time for readability.
- Translates status codes and airport identifiers into human-friendly labels.
- In Home Assistant, open HACS → Integrations → ⋮ → Custom repositories.
- Add
https://github.com/WickedGhost/avinor_flight_dataas typeIntegration. - Install Avinor Flight Data from HACS.
- Restart Home Assistant.
- Navigate to Settings → Devices & Services → Add Integration → search for "Avinor Flight Data".
- Follow the configuration flow to pick an airport, direction, and time window.
| Option | Description | Default |
|---|---|---|
| Airport | Any Avinor airport (searchable list). | none |
| Direction | A (arrivals) or D (departures). |
D |
| Time from | Hours back from now to include in results. | 1 |
| Time to | Hours forward from now to include in results. | 7 |
| Schedule source | avinor or airlabs schedules. |
avinor |
| Airlabs API key | Optional API key used for flight details. | none |
Each configured sensor reports the flight count as its state and exposes detailed flight data through the flights attribute.
When Schedule source is set to airlabs, the integration uses Airlabs airport schedules for arrivals/departures, dedupes codeshares, and normalizes the result to the same sensor attributes. This is useful for airports that are missing or incomplete in Avinor's public feed.
- This integration mirrors the public Avinor flight feed and does not supplement missing airport data from other sources.
- Avinor documents that the service does not include data from private airports such as Sandefjord Airport, Torp (TRF).
- Private airports may therefore show incomplete, delayed, or missing arrivals and departures even when the integration is working correctly.
This integration can optionally fetch details for a specific flight from the Airlabs Flight API: https://airlabs.co/docs/flight
You can obtain an API key by creating an account at https://airlabs.co/ (free for personal use).
- In Home Assistant, go to Settings → Devices & Services.
- Find Avinor Flight Data.
- Open Configure / Options.
- Enter your key in the airlabs_api_key field.
- Submit/save.
The key is optional. If you don’t set it, you can still call the service by passing api_key in the service data.
The same key can also be used for the optional Schedule source = Airlabs schedules mode.
You can call this service from Developer Tools → Services, or from an automation.
Minimal example (IATA flight id):
service: avinor_flight_data.get_flight_details
data:
flight_iata: DY123Override the configured key (useful for testing):
service: avinor_flight_data.get_flight_details
data:
api_key: YOUR_AIRLABS_KEY
flight_iata: DY123Notes:
- Provide at least one of:
flight_iata,flight_icao, orflight_number. - On Home Assistant versions that support service responses, the service returns the Airlabs
responseobject.
Repository: https://github.com/WickedGhost/avinor-flight-card
Install via HACS (Frontend)
- HACS → Frontend → ⋮ → Custom repositories → add the card repository as
Lovelace. - Install Avinor Flight Card and restart if prompted.
- Ensure the resource
/hacsfiles/avinor-flight-card/avinor-flight-card.jsis listed under Settings → Dashboards → Resources. - Edit your dashboard and add the "Avinor Flight Card" from the picker.
Manual YAML alternative
type: custom:avinor-flight-card
entity: sensor.avinor_osl_d
title: Oslo Departurestype: custom:avinor-flight-card
entity: sensor.avinor_OSL_A
title: Ankomster OSL- Card missing from the picker: clear browser cache or add the card resource manually.
- Integration not listed: verify HACS installed it and restart Home Assistant.
- Empty sensor state: check the entity in Developer Tools → States and confirm the selected window includes flights.
- Resource 404 errors: confirm the path
/hacsfiles/avinor-flight-card/avinor-flight-card.jsexists after installation.
- 1.1.2
- Airlabs schedule-backed entities now use airport names in the airport column instead of raw IATA codes.
- 1.1.1
- Refreshed config wizard translations for the Airlabs API key field so the explanatory text is picked up correctly.
- 1.1.0
- Added an opt-in Airlabs schedules source for airports that are incomplete in Avinor's public feed.
- Dedupes codeshare schedule rows and normalizes Airlabs data to the existing sensor format.
- 1.0.9
- Documented the upstream Avinor limitation for private airports such as TRF/Torp.
- 0.2.1
- Split the Lovelace card into its own repository.
- Updated HACS/Hassfest workflows to meet current validation requirements.
- Refreshed documentation for the new repository layout.
- 0.2.0
- Ensured Python 3.10 compatibility during integration setup.
- Hardened API error handling for timeouts, HTTP failures, and connection issues.
- Cached the airport list for 24 hours to limit external requests during setup.
- Respected options overrides (time window) after reload.
- Escaped HTML in the Lovelace card and added initial API parsing tests.
"Flydata fra Avinor" – https://www.avinor.no/
