Hi, I am hoping someone can help me with the flex-table-card operation as I just can’t get my head around the issue I have.
I am extracting the aircraft data from my raspPi which I can get from the received html data in Node Red (http://192.168.1.126:8080/data/aircraft.json). I have manipulated that data to remove any incomplete datasets and then I can receive each aircraft as a single payload with the attributes I want. That fills only 1 horizontal row, but nothing more as. it just overwrites until the last item.
(example sensor with attributes).
Reading a bit more I can see the data needs to be an array to fill subsequent rows, so I have joined each message as an array, but now I am stuck as I don’t know how to send this information to the HA flex card
(example Node Red output )
{“hex”:“4006b4”,“flight”:"TOM74L ",“alt_baro”:38000,“alt_geom”:39175,“gs”:450,“ias”:258,“tas”:462,“mach”:0.812,“track”:8,“track_rate”:0,“roll”:-0.2,“mag_heading”:13.7,“baro_rate”:-64,“geom_rate”:-32,“squawk”:“7455”,“emergency”:“none”,“category”:“A4”,“nav_qnh”:1013.6,“nav_altitude_mcp”:35008,“nav_heading”:14.8,“nav_modes”:[“vnav”,“tcas”],“lat”:49.965,“lon”:-3.808,“nic”:8,“rc”:186,“seen_pos”:0.4,“version”:2,“nic_baro”:1,“nac_p”:9,“nac_v”:1,“sil”:3,“sil_type”:“perhour”,“gva”:2,“sda”:2,“mlat”:[],“tisb”:[],“messages”:1017,“seen”:0,“rssi”:-12.9}
payload[1] … etc
I also tried the RESTFUL config to look at the json file but I can’t get that to work either
config
rest:
- authentication: basic
username: "admin"
password: "password"
scan_interval: 60
resource: http://192.168.1.126:8080/data/aircraft.json
sensor:
- name: "fltaware"
json_attributes_path: "$.response.aircraft"
value_template: "OK"
json_attributes:
- "now"
- "aircraft"
- "flight"
- "alt_baro"
- "gs"
- "track"
- "lat"
- "lon"
I would be greatful for any pointers to help
Thanks