I am struggling with adding a gps tracker to my hass.
Here is the json i am trying to extract data from:
{
"channel": 0,
"from": 621159684,
"hops_away": 0,
"id": 448070162,
"payload": {
"altitude": 457,
"latitude_i": 16734000,
"longitude_i": 400646000,
"precision_bits": 32,
"time": 1715343672
},
"rssi": -48,
"sender": "!f71f0920",
"snr": 10.25,
"timestamp": 1715343672,
"to": 4294967295,
"type": "position"
}
This is my current code:
mqtt:
sensor:
- name: "LoRa_hesttest"
state_topic: "msh/EU_433/2/json/LongFast/!f71f0920"
value_template: >
"latitude": {{ value_json['payload'].latitude_i }},
"longitude": {{ value_json['payload'].longitude_i }}
device_tracker:
- name: "Hest"
state_topic: "msh/EU_433/2/json/LongFast/!f71f0920"
value_template: >
"latitude": {{ value_json['payload'].latitude_i }},
"longitude": {{ value_json['payload'].longitude_i }}
and here is the results i get so far:
I can read the fictive latitude and longitude on the test sensor i’ve created, but i cannot for the life of me translate it into a useable tracker.