Hello,
I created a python script that return the next flight departures and arrivals for the upcoming x hours.
I would like to display this output in HA now instead of running the script manually each time. In the end I would like to have a list with 1 line per flight in the UI.
I am a bit loss on how to integrate this into HA though.
The different options look like:
- HA Python scripts integration: this does not support python imports so I can’t use it
- command_line integration: this may work but I don’t see the script output anywhere, nor do I know if it is possible to interpret a json array
- pyscript or appdaemon: those 2 looks like they are designed to interact directly with HA components. Not sure if it is what I need.
What is the best way to proceed from here ?
Thanks for your suggestions
Here is its current output (I can adapt this if required) :
[
[
{
"date": "06/02/2025",
"arrival_time": "16:24",
"from": "Munich",
"airline": "Lufthansa",
"flight_number": "LH2398",
"status": "Landed 16:18",
"note": "",
"direction": "A",
"aircraft": "Bombardier CRJ-900",
"time_left": "2min"
},
{
"date": "06/02/2025",
"arrival_time": "16:25",
"from": "Rabat Sale",
"airline": "Netjets",
"flight_number": "NJE801",
"status": "",
"note": "Cargo",
"direction": "A",
"aircraft": "Bombardier Global Express (C)",
"time_left": "3min"
},
{
"date": "06/02/2025",
"arrival_time": "16:35",
"from": "Istanbul Sabiha Gökcen",
"airline": "Pegasus Airlines",
"flight_number": "PC942",
"status": "Boarding closed",
"note": "",
"direction": "D",
"aircraft": "Airbus A321neo",
"time_left": "13min"
}
]
]