Custom Component: Flightradar24

Hi All,
does anyone know how I can calculate the remaining distance, I don’t believe that entry is available? any help would be apricated.

Regards

Greetings all (and @AlexandrErohin) -

I really enjoy this integration, and a LOT of hard work has gone into this!

I need to track when planes in my fleet are actually in the air. 90% of the time, they are on the ground. But when they go up, I’d like to have a markdown card that’ll pop up on the monitor that runs HA 24/7 in my “cockpit”, for my situational awareness. I think I need to add the flight numbers and/or tail numbers using the “Add to Track” function, but I’m not sure how to actually enable that.

I don’t need to know when the planes are in my area; in fact, they could be several hundred miles away from me, but I’d still want to know when they are in the air.

Is there a way to make this work? Also, all of the planes in my fleet start with the same three letters in their callsign.

Thank you!

Hi, I am working on trying to get the map to update when tracking an additional plane. I inject the lat and long that is pulled from the first planes attributes but it isnt centering the map on them. If i put into developers tools pulling the resulting co-ordinates it works perfectly.

Any Pointers on how i can improve this?

type: vertical-stack
title: Flightradar24
cards:
  - type: iframe
    url: >-
      https://www.flightradar24.com/simple?lat={{
      states.sensor.flightradar24_additional_tracked.attributes.flights[0].latitude
      }}&lon={{
      states.sensor.flightradar24_additional_tracked.attributes.flights[0].longitude
      }}&z=10&label1=reg&size=small
    aspect_ratio: 100%

hi @AlexandrErohin . thank you for the update . my IP was banned by flightradar and hence could not use the integration but I finally got my IP changed and got it up and running again . the sceduled flight works fine but is it possible to get the registration of the aircraft once it is added to the additional tracked flight ?

here is what I aim to achieve :

  1. from my calendar I can retrieve my flight number , Example : 6E5085
  2. I add this to additional flight tracked and extract the registration of the flight
  3. now one hour before my reporting for work (example , we consider that I am flying 6E5085) , I can set up an automation to check where the aircraft is and leave home accordingly in case the flight is delayed or before time .

the issue i am facing is that i cannot retrieve the registration from the scheduled flight as the value reported is null . attached is the screenshot of the same .

once again thanks a lot for this wonderful integration . if this works out , it will help me a hell lot .

  1. To avoid banning don’t decrease scan interval. Most bannings happens because of that. 2) Unfortunately, FR24 doesn’t provide registration number for a scheduled flight

v1.23.0 Released

Changelog

@AlexandrErohin . Thank You for replying so quickly. much appreciate it. however on the wesite F24 does provide the registration information couple of hours before the flight . at least for indigo (the airline i intend to use it for ) . attached is the picture extract from the website for 12/12/24. The flight is scheduled to take off in 1 hour from the time I posted this reply.

I’d guess what Alexandr means is that the API doesn’t return this info

looking here Flightradar24 API - Documentation it seems to return it for Live flights but not for Tracked flights…but that’s just me guessing

a Tracked flight returns the below as per the API documentation where as a Live flight has much more info

“timestamp”: “2024-07-02T11:22:43Z”,
“lat”: 62.97148,
“lon”: -26.25193,
“alt”: 33000,
“gspeed”: 505,
“vspeed”: 0,
“track”: 105,
“squawk”: “2566”,
“callsign”: “THY10”,
“source”: “ADSB”

FR24 doesn’t provide it at API method which integration uses. If additionally add parsing this page you mentioned - it would increase API calls to FR24 and FR24 banned you by IP

The integration uses different API - this API is for paid use

1 Like

Ah OK…just trying to help as it’s the same question on repeat in the thread despite you saying no already…

thank you so much for replying @Gav_in and @AlexandrErohin . i guess i will just have to wait until they come up with an update where the registration info is returned for tracked flights as well. hopefully soon.

1 Like

Now you can:

1 Like

@Gav_in Thank you for your help! I really appreciate you helping people here

1 Like

How’d you pull in the photo?

It’s there in the markdown card code on the post you replied to
Edit…actually maybe it’s not :see_no_evil: but think it’s this you need…

<img src="{{ flight.aircraft_photo_large }}"></img>

It’s pulled in with the detection of a flight.
You can see all the data that’s pulled in for a detected aircraft here

1 Like

@smac3265 did you ever solve this? I want to do the same thing. There’s the "enable device_tracker for additional tracking flights in the configuration which I’ve enabled, but I don’t know how to actually add aircraft to the additionally tracked list.

No, I have not yet. I’m a Wing Commander in CAP, and I have 6 planes in our fleet. I have a HA monitor running in my home office 24/7, and I’d LOVE to have a markdown card pop up when one of my 6 planes is in the air. :slight_smile:

Can’t seem to get it to work

you’d be best to post your own code that you can’t get working than just linking back to someone else as it’s impossible to know what you are doing otherwise…

1 Like