A custom Lovelace card for Home Assistant that displays flight information from the Avinor Flight Data integration.
- Display flight information in a clean table format
- Real-time data from Avinor flight sensors
- Customizable title and entity selection
- Responsive design for mobile and desktop
- Make sure you have HACS installed
- Go to HACS -> Frontend
- Click the "+" button and search for "Avinor Flight Card"
- Click Install
- Restart Home Assistant
- Download the
avinor-flight-card.jsasset from the latest release
- A ZIP containing the same file plus documentation is also attached if you prefer that format
- Copy it to your
config/wwwfolder (you may keep it inside acustom-lovelaceor similar subfolder) - Add the following to your
configuration.yaml(cache-busting with version is recommended):
lovelace:
resources:
- url: /local/avinor-flight-card.js?v=1.0.9
type: module- Restart Home Assistant
- If you upgrade the card, update the
?v=query to the new version or clear the browser cache
If you want to work on the card locally:
npm install
npm run buildThe bundled file is written to dist/avinor-flight-card.js, which is uploaded as avinor-flight-card.js in each GitHub release for HACS.
Before tagging a release, bump the version everywhere with:
npm run set-version -- 1.2.3This updates package.json, package-lock.json, and the version string in the README's YAML example.
Add the card to your Lovelace dashboard:
type: custom:avinor-flight-card
entity: sensor.avinor_flight_data
title: "Flight Information"| Name | Type | Default | Description |
|---|---|---|---|
entity |
string | Required | The entity ID of your Avinor flight sensor |
title |
string | "Avinor Flight Data" |
Title displayed on the card |
exclude_columns |
string[] | [] |
Columns to hide. Valid values: flight, type, scheduled, airport, check_in, gate, status |
compact |
boolean | false |
Use a more compact table layout |
show_table_header |
boolean | true |
Show/hide the table header row |
show_meta |
boolean | true |
Show/hide the meta line above the table (airport/direction/updated) |
row_click_action |
string | "none" |
Row click behavior. Valid values: none, more-info, flight-details |
sort_by |
string | "scheduled" |
Sort rows by. Valid values: scheduled, flight, type, airport, check_in, gate, status |
sort_dir |
string | "asc" |
Sort direction. Valid values: asc, desc |
max_rows |
number | 0 |
Maximum rows to display. 0 shows all flights |
Example:
type: custom:avinor-flight-card
entity: sensor.avinor_flight_data
title: "Flight Information"
compact: true
show_table_header: true
show_meta: true
row_click_action: more-info
sort_by: scheduled
sort_dir: asc
max_rows: 10
exclude_columns:
- type
- check_in
- gate
If you have configured an Airlabs API key in the Avinor Flight Data integration options, you can let the card fetch flight details when you click a row.
- Set
row_click_action: flight-details - The card calls the service
avinor_flight_data.get_flight_detailsusing the flight id (IATA), and shows the returned data in a simple details view inside the card
- Home Assistant 0.115.0 or newer
- Avinor Flight Data integration
If you encounter any issues or have feature requests, please open an issue.
