AlexandrErohin / home-assistant-flightradar24

Flightradar24 integration for Home Assistant
https://community.home-assistant.io/t/custom-component-flightradar24
MIT License
170 stars 16 forks source link

FlightRadar24 Entered area triggered at incorrect location #83

Open SingingDwarf opened 1 week ago

SingingDwarf commented 1 week ago

I have installed and configured HA-FR24 with the following settings:

Radius in meters
1000
Latitude
52.xx
Longitude
1.yy
Scan interval for updates in seconds
10
The minimum altitude in feet above which all aircraft will be tracked.
-1
The maximum altitude in feet below which all aircraft will be tracked.
5000

where xx and yy are two digits for my location.

The 'FlightRadar24 Entered area' trigger is raised for flights entering a location near Toronto, rather than the location configured within the UK.

Furthermore when running the notification shown in the example, I get the following error:

Template variable error: 'dict object' has no attribute 'event' when rendering 'Flight entry of {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city }} [Open FlightRadar](https://www.flightradar24.com/{{ trigger.event.data.callsign }})'
Template variable error: 'trigger' is undefined when rendering 'Flight entry of {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city }} [Open [Open FlightRadar](https://www.flightradar24.com/{{ trigger.event.data.callsign }})'
Template variable error: 'dict object' has no attribute 'event' when rendering 'Flight entry of {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city }} [Open [Open FlightRadar](https://www.flightradar24.com/{{ trigger.event.data.callsign }})'
Template variable error: 'dict object' has no attribute 'event' when rendering 'Flight entry of {{ trigger.event.data.callsign }} to {{ trigger.event.data.airport_destination_city }} [Open FlightRadar](https://www.flightradar24.com/{{ trigger.event.data.callsign }})'
AlexandrErohin commented 1 week ago

1) there should be 5 digits after the dot - not 2 2) Are you sure you use right trigger? The error says there is no event in trigger

SingingDwarf commented 1 week ago

Looks like this is related to the top 10 tracked flights - disabling this and I get notifications for flights in the correct area

AlexandrErohin commented 1 week ago

Could you post your automation code?

atlflyer commented 1 hour ago

I had a similar problem. I live in the United States, and when I configured the component with my lat/lon it instead was reporting flights that were over a particular spot in the Mediterranean Sea where the latitude and longitude where both equal to my latitude. Disabling the top tracked flights resolved the issue.