Skip to content

Commit

Permalink
Merge branch 'release/v0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fratsloos committed Jun 26, 2022
2 parents 2e45f6c + 0a10812 commit f04f8a1
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 31 deletions.
2 changes: 1 addition & 1 deletion dist/fr24_card.js

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,37 @@ The following configuration options are available:
| Option | Type | Default | Accepted | Description |
| :--------------- | :-------- | :----------------------------------------------------------------------------- | :------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `attribute` | `string` | `aircraft` | An attribute of the sensor | By default the card will read the aircrafts from the sensors `aircraft` attribute. If your sensor uses a different attribute, change this value to the name of your attribute. |
| `zone` | `string` | `null` | Any sensor that is a zone, example `zone.home` | The distance between Home Assistant and the reported position of the aircraft is calculated using the position of a zone. If you don't set a `zone` the data doesn't have the distance. |
| `sort` | `string` | `altitude` | Any column, see [columns](#columns) | The data in the table is by default sorted on the altitude, with this option you can set a different column, for example `flight`. |
| `columns` | `array` | `["flag", "registration", "flight", "altitude", "speed", "distance", "track"]` | Array with any of the columns, see [columns](#columns) | Array 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. |
| `hide` | `object` | | | Used to configure which data is hidden. See [Hide](#hide). |
| `lang` | `string` | `null` | Any supported language, see the [lang folder](src/javascript/lang/) | Sets the display language of the data. By default the `hass` 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. |
| `popup` | `boolean` | `false` | `true`, `false` | Enables or disables the popup. The popup requires both [browser_mod](https://github.com/thomasloven/hass-browser_mod) and [card-mod](https://github.com/thomasloven/lovelace-card-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 by [Planespotters.net](https://www.planespotters.net/photo/api).<br><br>![Example of the popup](https://raw.githubusercontent.com/fratsloos/fr24_card/master/readme/images/popup.png?raw=true "Example of the popup") |
| `units` | `string` | `default` | `default`, `metric` | Sets the units for the values. The `default` units are as they are returned by Dump1090 (`ft` for altitude, `NM` for distance, `kt` for speed). When using `metric` the value and units are converted (`m` for altitude and distance, `m/s` for speed). |
| `larger_units` | `boolean` | `false` | `true`, `false` | When using `metric` units, and this option set to `true`, the units are converted to `km` for altitude and distance and `km/h` for speed. |
| `units_in_table` | `boolean` | `false` | `true`, `false` | When this option is set to `true`, the table header will be appended with a second row containing the units.<br><br>![Units in the table header](https://raw.githubusercontent.com/fratsloos/fr24_card/master/readme/images/units.png?raw=true "Units in the table header") |
| `limit` | `number` | `null` | A positive integer | Used to limit the number of results in the table. |
| `popup` | `boolean` | `false` | `true`, `false` | Enables or disables the popup. The popup requires both [browser_mod](https://github.com/thomasloven/hass-browser_mod) and [card-mod](https://github.com/thomasloven/lovelace-card-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 by [Planespotters.net](https://www.planespotters.net/photo/api).<br><br>![Example of the popup](https://raw.githubusercontent.com/fratsloos/fr24_card/master/readme/images/popup.png?raw=true "Example of the popup") |
| `order` | `string` | `asc` | `asc`, `desc` | Sort order of the data. Ascending (`asc`, smallest value first) or descending (`desc`, largest value first). |
| `sort` | `string` | `altitude` | Any column, see [columns](#columns) | The data in the table is by default sorted on the altitude, with this option you can set a different column, for example `flight`. |
| `track_in_text` | `boolean` | `false` | `true`, `false` | By default the reported track of the aircraft is displayd in degrees `°`. With this option set to `true` the track is displayed in text. When displayed in text, it's an abbreviation in the table and full text in the popup. |
| `columns` | `array` | `["flag", "registration", "flight", "altitude", "speed", "distance", "track"]` | Array with any of the columns, see [columns](#columns) | Array 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. |
| `hide` | `object` | | | Used to configure which data is hidden. See [Hide](#hide). |
| `units_in_table` | `boolean` | `false` | `true`, `false` | When this option is set to `true`, the table header will be appended with a second row containing the units.<br><br>![Units in the table header](https://raw.githubusercontent.com/fratsloos/fr24_card/master/readme/images/units.png?raw=true "Units in the table header") |
| `units` | `string` | `default` | `default`, `metric` | Sets the units for the values. The `default` units are as they are returned by Dump1090 (`ft` for altitude, `NM` for distance, `kt` for speed). When using `metric` the value and units are converted (`m` for altitude and distance, `m/s` for speed). |
| `zone` | `string` | `null` | Any sensor that is a zone, example `zone.home` | The distance between Home Assistant and the reported position of the aircraft is calculated using the position of a zone. If you don't set a `zone` the data doesn't have the distance. |

## Columns

The card supports the following columns:

| Column | Data |
| :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| `icon` | Icon for the airplane, unique colored based on the hex (`icao`) of the aircraft. Uses the vertical state of the aircraft for different icons. |
| `icao` | ICAO code of the aircraft |
| `flag` | Flag of the country of registration |
| `age` | Age of the message |
| `altitude` | Reported altitude |
| `country` | Country of registration |
| `registration` | Registration code of the aircraft |
| `distance` | Calculated distance between the configured `zone` and the reported position |
| `flag` | Flag of the country of registration |
| `flight` | Flight number |
| `squawk` | Squawk code |
| `altitude` | Reported altitude |
| `icao` | ICAO code of the aircraft |
| `icon` | Icon for the airplane, unique colored based on the hex (`icao`) of the aircraft. Uses the vertical state of the aircraft for different icons. |
| `registration` | Registration code of the aircraft |
| `speed` | Reported speed |
| `distance` | Calculated distance between the configured `zone` and the reported position |
| `squawk` | Squawk code |
| `track` | Reported track |
| `age` | Age of the message |

All of the columns, except for `icon` are shown in the popup.

Expand Down
Loading

0 comments on commit f04f8a1

Please sign in to comment.