Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove the ground vehicles? #95

Open
TheHuskyCrobats opened this issue Jan 6, 2025 · 2 comments
Open

How to remove the ground vehicles? #95

TheHuskyCrobats opened this issue Jan 6, 2025 · 2 comments

Comments

@TheHuskyCrobats
Copy link

Any ideea on how can I remove the ground vehicles? I have a lot showing if I track in an airport area.

@TheHuskyCrobats TheHuskyCrobats changed the title How to remove rthe ground vehicles? How to remove the ground vehicles? Jan 6, 2025
@AlexandrErohin
Copy link
Owner

AlexandrErohin commented Jan 9, 2025

@TheHuskyCrobats You may filter by altitude in the integration settings. Or ground vehicles aircraft_code is GRND or null filter in the Lovelance Card like

{% if flight.aircraft_code is defined and flight.aircraft_code != 'GRND' %}
....
{% endif %}

P.S. Would be great if you could give a star to the repo :) Thanks

@TheHuskyCrobats
Copy link
Author

TheHuskyCrobats commented Jan 11, 2025

Sorry to bother you, but I am less than basic at coding.
Where do I put those lines?
This is how it looks now (the location is close to an small airport, I don't want to remove the planes from the ground also, just the vehicles).

`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 %}{% if (flight.tracked_type |
      default('live')) == 'live' %}
      {{ flight.flight_number }} - {{ flight.airline_short }} - {{ flight.aircraft_model }}
      {{ flight.airport_origin_city }}{%if flight.airport_origin_city %}{% endif %} -> {{ flight.airport_destination_city }}{%
      if flight.airport_destination_country_code %}{% endif %}
      {%if flight.time_scheduled_departure %}Departure - {{ flight.time_scheduled_departure | timestamp_custom('%H:%M') }}; {% endif %}{%if flight.time_scheduled_arrival%}Arrival - {{ flight.time_scheduled_arrival | timestamp_custom('%H:%M') }}{% endif %}
      Altitude - {{ flight.altitude }} ft{%if flight.altitude > 0 %} ({{(flight.altitude * 0.3048)| round(0)}} m){% endif%}; Gr. speed - {{ flight.ground_speed }} kts{%if flight.ground_speed > 0 %} ({{(flight.ground_speed * 1.852)| round(0)}} km/h){% endif%}
      {% else%}
      {{ flight.flight_number }} - {{ flight.callsign }} - {{ flight.tracked_type }}
      {% endif%}{% endfor %}
      `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants