Custom Component: Flightradar24

You may try to exclude these 3 sensors from Recorder to track.

About restrict the returned flight attributes - it is complicated as I get more request to add more attributes, or store more flights for more time

Could you post your list of attributes that you use?

Maybe there could be a setting in the configuration flow that allows defining a, say comma separated list, of returned attributes. Everything could then be returned if said setting was left empty. Just one idea, perhaps thereโ€™s a better way to do it too.

The attributes I personally use and need in my environment are: flight_number, airline_short, aircraft_model, airport_origin_city, airport_destination_city, airport_origin_country_code, airport_destination_country_code, id, call_number, latitude, longitude

Hi, is there a way to send a notification when a specific registration number aircraft enters the area? thanks.

You just need to add condition block for the given example

automation:
  - alias: "Flight entry notification"
    trigger:
      platform: event
      event_type: flightradar24_entry
    condition:
       - condition: template
         value_template: "{{ trigger.event.data.flight_number == 'LH247' }}"
    action:
      service: notify.mobile_app_<device_name>
      data:
        message: "Flight entry of {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city }}"
2 Likes

Released v0.2.0

Changelog

Released v1.0.0

Changelog

Awesome component, as suggestion it would be great to define the watching area not only by radius but also by a set of points. For example, I am interested in one specific direction from which I can observe the airplanes and it could be defined as an ellipse.

1 Like

Unfortunately, Flightradar24 doesnt allow ellipse area

Very nice integration, thank you!
I installed it today and it works like a charm.

Iโ€™m curious, is it possible to show

  • a list of all detected planes for a day (or period)

Has anybody already created a card for that use case?

A list of all inbound flights can be made with the Helpers โ†’ Utility Meter

v1.1.0 Released

Changelog

  • Added FlightRadar24 authentication support for those who have FlightRadar24 subscription

v1.2.0 Released

Changelog

1 Like

Hello,
Thanks for this nice HA integration.
I try to add this condition in a script:

condition:
  - condition: template
    value_template: "{{ trigger.event.data.altitude < '7000' }}"

But I get this error when a flight passe over my house:
Erreur : In 'template' condition: TypeError: '<' not supported between instances of 'int' and 'str'

trigger.event.data.altitude is a string or an integer?
How to modify the condition ?

Remove the quotes around 7000

1 Like

v1.3.0 Released

Changelog

2 Likes

v1.4.0 Released

Changelog

1 Like

Dear, has anybody a working automation (integrated into the automation.yaml) which works here. I tried several ideas, but above code doesnt work at my side. Thanks for helping, JJ

What automation did you try and did you have any errors in Logs?

I use this automation and it works well

- id: '1700072369724'
  alias: FlightRadar24 notify
  description: ''
  trigger:
  - platform: event
    event_type: flightradar24_entry
  - platform: event
    event_type: flightradar24_exit
  condition: []
  action:
  - if:
    - condition: template
      value_template: '{{ ''flightradar24_entry'' == trigger.event.event_type }}'
    then:
    - service: notify.persistent_notification
      data:
        message: Flight entry of {{ message}}
  - if:
    - condition: template
      value_template: '{{ ''flightradar24_exit'' == trigger.event.event_type }}'
    then:
    - service: notify.persistent_notification
      data:
        message: Flight exit of {{ message}}
  variables:
    message: '{% set flight = trigger.event.data %} {{ flight.flight_number }} - {{
      flight.airline_short }} - {{ flight.aircraft_model }} {{ flight.airport_origin_city
      }}{%if flight.airport_origin_city %}<img src="https://flagsapi.com/{{ flight.airport_origin_country_code
      }}/shiny/16.png" />{% endif
      %} -> {{ flight.airport_destination_city }}{% if flight.airport_destination_country_code
      %}<img src="https://flagsapi.com/{{ flight.airport_destination_country_code
      }}/shiny/16.png" />{%
      endif %}'
  mode: parallel

I live near an airport and wish to exclude aircraft that have 0 speed and 0 altitude from the card I am using. I get an error when using this syntax

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
      value_template: โ€˜{{ trigger.event.data.altitude > 0 }}โ€™

Can someone help me out on this please. The error I am getting is
โ€œKey โ€˜value_templateโ€™ is not expected or not supported by the visual editor.โ€

Thanks

Can any one please help me with the syntax I need to exclude planes that are not in the air and not moving.
Thanks