Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Lovelace card for showing Dump1090 data from FR24 in Home Assistant

NotificationsYou must be signed in to change notification settings

fratsloos/fr24_card

Repository files navigation

A custom card for Home Assistant to list the aircraft found in theDump1090 output of your ADS-B/Mode S receiver.

Screenshot of FR24 card in action

This card is developed and tested based on the output ofdata/aircraft.json of theFlightRadar24 Pi24 image.

The FR24 card has many configuration options and supports multiple languages.

Did my project help you? Then you can always thank me with a coffee!

"Buy Me A Coffee"


Contents of this file


Preparation

To use the card you need to create a sensor that reads the JSON from Dump1090. Add the following configuration to yoursensors.yaml:

-platform:restname:FR24 Aircraftresource:http://dump1090-host/dump1090/data/aircraft.jsonvalue_template:"{{ value_json.messages }}"method:GETscan_interval:15json_attributes:    -now    -aircraft

Update the keyresource in this configuration to the correct URL of your Dump1090 output. Thescan_interval of 15 seconds is a suggestion, you can change this in any other value. But keep in mind that a lower interval results in a higher load on your Home Assistant environment.

After adding the sensor you need to restart Home Assistant. After restarting, in the Developer Tools check if the sensor has data.

Installation

hacs_badge

Install usingHACS, or followthese instructions.

Add the card to your dashboard

The card can be added to your dashboard like any other card. If you do not see the card as an option, clear the cache of your browser and try again.

The minimal configuration of the card contains only the entity of the sensor. When using the sensor from the above example, the card can be added with the following configuration:

type:custom:fr24-cardentity:sensor.fr24_aircraft

Configuration

All options can be added in the configuration of the card, eg:

type:custom:fr24-cardentity:sensor.fr24_aircraftlang:nlsort:track

The following configuration options are available:

OptionTypeDefaultAcceptedDescription
attributestringaircraftAn attribute of the sensorBy default the card will read the aircrafts from the sensorsaircraft attribute. If your sensor uses a different attribute, change this value to the name of your attribute.
colorsobjectUsed to overwrite the default color scheme of the card. SeeColors.
columnsarray["flag", "registration", "flight", "altitude", "speed", "distance", "track"]Array with any of the columns, seecolumnsArray containing the columns to show in the table. The data of the other columns is available in the popup, if that is enabled. Too many columns will break your Dashboard, so the card will give a warning if too many columns are added.
hideobjectUsed to configure which data is hidden. SeeHide.
langstringnullAny supported language, see thelang folderSets the display language of the data. By default thehass object of your browser will be used to set the language. If that language is not available, English will be used. The registered country is always in English.
larger_unitsbooleanfalsetrue,falseWhen usingmetric units, and this option set totrue, the units are converted tokm for altitude and distance andkm/h for speed.
limitnumbernullA positive integerUsed to limit the number of results in the table.
orderstringascasc,descSort order of the data. Ascending (asc, smallest value first) or descending (desc, largest value first).
popupbooleanfalsetrue,falseEnables or disables the popup. The popup requires bothbrowser_mod andcard-mod]. The popup can be opened by clicking on a row and contains more data of the aircraft, including a photo of the aircraft provided byPlanespotters.net.

Example of the popup
sortstringaltitudeAny column, seecolumnsThe data in the table is by default sorted on the altitude, with this option you can set a different column, for exampleflight.
titlestringnullTitle of the card.
track_in_textbooleanfalsetrue,falseBy default the reported track of the aircraft is displayd in degrees°. With this option set totrue the track is displayed in text. When displayed in text, it's an abbreviation in the table and full text in the popup.
units_in_tablebooleanfalsetrue,falseWhen this option is set totrue, the table header will be appended with a second row containing the units.

Units in the table header
unitsstringdefaultdefault,metricSets the units for the values. Thedefault units are as they are returned by Dump1090 (ft for altitude,NM for distance,kt for speed). When usingmetric the value and units are converted (m for altitude and distance,m/s for speed).
zonestringnullAny sensor that is a zone, examplezone.homeThe distance between Home Assistant and the reported position of the aircraft is calculated using the position of a zone. If you don't set azone the data doesn't have the distance.

Colors

By default the card uses the primairy and secondairy colors of the active color scheme. In some cases this might lead to unwanted results. Using thecolors object in the configuration of the card it's possible to overwrite the colors of both the table in the card and the popup.

The colors can be added as values that are accepted by CSS: HEX code (which must be enclosed by single quotes), RGB value, named color or a CSS variable. Example:

type:custom:fr24-cardentity:sensor.fr24_aircraftcolors:table_head_bg:var(--primary-color)table_head_text:yellowtable_units_bg:rgb(187,78,123)table_units_text:'#00ff00'

With this option you can really go creative and make theugliest most original creations. The following options are available:

KeyDescription
table_head_bgBackground color of the table header
table_head_textText color of the table header
table_units_bgBackground color of the row with the units
table_units_textText color of the row with the units
table_textDefault text color for cells
table_even_row_bgBackground color for every second row (zebra striping)
table_even_row_textText color for every second row (zebra striping)
popup_bgBackground color of the popup
popup_textDefault text color in the popup
popup_table_head_bgBackground color of the table header in the popup, if not used this option will fall back ontable_head_bg
popup_table_head_textText color of the table header in the popup, if not used this option will fall back ontable_head_text
popup_table_even_row_bgBackground color for every second row in the popup (zebra striping), if not used this option will fall back ontable_even_row_bg
popup_table_even_row_textText color for every second row in the popup (zebra striping), if not used this option will fall back ontable_even_row_text

Columns

The card supports the following columns. Because there are many different formats of output of the Dump1090 (or Tar1090) data, not all columns are arvailable for each installation.

ColumnDataComment
ageAge of the message
aircraft_typeReported aircraft typeNot the same as thecategory in the JSON. Not available in all installations. See issue#15.
altitudeReported altitude
countryCountry of registration
distanceCalculated distance between the configuredzone and the reported position
flagFlag of the country of registration
flightFlight number
icaoICAO code of the aircraft
iconIcon for the aircraftUnique colored based on the hex (icao) of the aircraft. Uses the vertical state of the aircraft for different icons.
registrationRegistration code of the aircraftThe registration of the aircraft is calculated based on the reported ICAO code. However, some of the JSON files contain the registration. If the registration is found in the JSON, this data is used. See issue#15.
speedReported speed
squawkSquawk code
trackReported track

All of the columns, except foricon are shown in the popup.

Hide

With this object it's possible to set the configuration of the data that is hidden. Data must be added as an object in the yaml configuration. Example:

type:custom:fr24-cardentity:sensor.fr24_aircrafthide:old_messages:false

The following keys are available in the object:

OptionTypeDefaultAcceptedDescription
old_messagesbooleantruetrue,falseBy default aircraft data which is received more than 30 seconds ago will be filtered out of the card. Setting this option tofalse will show all aircraft data that is available in the JSON file.
emptyarrayArray with columns, seeexamplesBy default, all aircraft are shown, including empty values in the table. With this option it is possible to set the columns that should not be empty. The array acts as an 'or' selector; if one of the columns has an empty value, the plane is not added to the table. This option is especially useful in combination withsort andorder.

Hide empty values

With the optionhide.empty it's possible to remove empty values from the table.

Example to remove all rows where there is no distance:

type:custom:fr24-cardentity:sensor.fr24_aircrafthide:empty:    -distance

Example to remove all rows where there is no distanceor track:

type:custom:fr24-cardentity:sensor.fr24_aircrafthide:empty:    -distance    -track

F.A.Q.

Please read ourF.A.Q. before opening an issue.

Contribute

You can help improving this card by forking this repository and merging your changes with a pull request to thedevelop branch of this repository.

This applies not only to additions and improvements to the code, but certainly also to newlanguages.

I am particularly interested in improvements to the registration code database. For more information about the database, clickhere.

Credits

Honor where credit is due. This card could not have been made without consulting the following sources:


[8]ページ先頭

©2009-2025 Movatter.jp