Skip to content

WickedGhost/avinor-flight-card

Repository files navigation

Avinor Flight Card

A custom Lovelace card for Home Assistant that displays flight information from the Avinor Flight Data integration.

GitHub Release GitHub Activity License hacs

Project Maintenance BuyMeCoffee

Community Forum

Features

  • 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

Avinor Flight Card example

Installation

HACS (Recommended)

  1. Make sure you have HACS installed
  2. Go to HACS -> Frontend
  3. Click the "+" button and search for "Avinor Flight Card"
  4. Click Install
  5. Restart Home Assistant

Manual Installation

  1. Download the avinor-flight-card.js asset from the latest release
  • A ZIP containing the same file plus documentation is also attached if you prefer that format
  1. Copy it to your config/www folder (you may keep it inside a custom-lovelace or similar subfolder)
  2. 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
  1. Restart Home Assistant
  2. If you upgrade the card, update the ?v= query to the new version or clear the browser cache

Development

If you want to work on the card locally:

npm install
npm run build

The bundled file is written to dist/avinor-flight-card.js, which is uploaded as avinor-flight-card.js in each GitHub release for HACS.

Versioning

Before tagging a release, bump the version everywhere with:

npm run set-version -- 1.2.3

This updates package.json, package-lock.json, and the version string in the README's YAML example.

Configuration

Add the card to your Lovelace dashboard:

type: custom:avinor-flight-card
entity: sensor.avinor_flight_data
title: "Flight Information"

Configuration Options

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

Flight details (Airlabs)

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_details using the flight id (IATA), and shows the returned data in a simple details view inside the card

Requirements

Support

If you encounter any issues or have feature requests, please open an issue.


About

Lovlace-card for the integration avionr_flight_data

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors