Persistant entity created with REST API

Hi,

I’m working on integrating an asset tracker to HA, the coordinates are pushed with POST via REST API, which create and tracks the device just fine, for example:

https://domain.duckdns.org:982173/api/states/device_tracker.tracker
{
  "attributes": {
    "friendly_name": "tracker",
    "gps_accuracy": 10,
    "latitude": 50,
    "longitude": 10
  },
    "state": "online"
}

However it is not persistent after the Host reboot, I noticed that this is the intended behavior, however I’m wondering if it is possible to make it persistent?

Or maybe add the device_trackerto the configuration.yaml, and on that case, which platform should I use? Since the example on the documentation only mentions “netgear”

Thanks :slight_smile:

Can you get your device to send the data via MQTT instead?

There is no template/generic tracker platform but there is an MQTT tracker:

Hi,

I could send over MQTT, but the MQTT Device Tracker does not have a coordinate attribute, does it?

And I’m not sure if it would integrate with the map card on lovelance, as it asks for device_tracker

Apologies. You are correct. It’s a binary home/not_home tracker.

Here’s a solution (this post and the one below it):

I haven’t tested but it makes sense