diff --git a/README.md b/README.md index c67c0ff..3d41fb0 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ It allows you: 3) Add flights table to your [Home Assistant dashboard](https://www.home-assistant.io/dashboards/) by [Lovelace Card](#lovelace)) +
## Components ### Events @@ -47,7 +48,7 @@ Flightradar24 is configured via the GUI. See [the HA docs](https://www.home-assi The default data is preset already - + 1. Go to the Settings->Devices & services. 2. Click on `+ ADD INTEGRATION`, search for `Flightradar24`. @@ -86,7 +87,7 @@ All available fields in `trigger.event.data` you can check [here](#flight) ### Lovelace Card You can add flight table to your [Home Assistant dashboard](https://www.home-assistant.io/dashboards/) - + 1. Go to your [Home Assistant dashboard](https://www.home-assistant.io/dashboards/) 2. In the top right corner, select the three-dot menu, then select Edit dashboard @@ -121,6 +122,48 @@ cards: All available fields for flight you can check [here](#flight) +### Lovelace Card with Map + + +1. Open in a browser https://www.flightradar24.com +2. Move the map so that your area is in the middle of the screen. And scroll to select comfortable map zoom +3. Now you have URL of the map like https://www.flightradar24.com/50.03,8.49/12 Remember this URL +4. Go to your [Home Assistant dashboard](https://www.home-assistant.io/dashboards/) +5. In the top right corner, select the three-dot menu, then select Edit dashboard +6. Click on `+ ADD CARD`, search for `Manual`, click on `Manual`. +7. Add following code to the input window. Replace LATITUDE, LONGITUDE and ZOOM from URL from step 4. (Example - https://www.flightradar24.com/50.03,8.49/12 - LATITUDE is 50.03, LONGITUDE is 8.49, ZOOM is 12) +8. Click `SAVE` + +```markdown +type: vertical-stack +title: Flightradar24 +cards: + - type: entities + entities: + - entity: sensor.flightradar24_current_in_area + name: In area + - type: conditional + conditions: + - condition: numeric_state + entity: sensor.flightradar24_current_in_area + above: 0 + card: + type: markdown + content: >- + {% set data = state_attr('sensor.flightradar24_current_in_area', + 'flights') %} {% for flight in data %} +