I want to build a “GPS Tracker” entity. The device will be a small cellular modem/router in a vehicle. I’d use a script in the router to update the Vehicle-GPS entity (probably via REST) every X minutes. Ideally, it would mimic the function of the GPS tracking in the iOS/Android apps.
Why not just use the Android/iOS apps? Well, primarily because that’s not quite as fun, and because the iOS app seems to do a terrible job at updating the entity, and also because at some point, I will use the router to update a separate database to track the vehicle as well.
What I can’t find is documentation on how to actually update the entity.
From the documentation, I’ve tried the example REST JSON of
{
"state": "vehicle_on",
"attributes": {
"latitude":"33.XXXXXX, ",
"longitude":"-114.XXXXX"
}
}
How should this work, in theory? If I successfully POST via the API, HomeAssistant takes care of logging the state/attributes into the database?