How do I make my own object with its own attributes?
For example, I made my arduino device, with a gps module, which calculates the location. And with the help of mobile internet to send data to HA.
HA has an api that allows me to save a value for the object with a POST request.
Eventually, I want to create my own object, a “car” that has a lng, lat, datetime property. To which to assign these values and display on the map. How can I do it?
It’s an “entity” you want, rather than an “object”.
If you’re using the API, here’s an example of an entity I create that has a bunch of attributes:
To display the entity on the map, you’d need to create a
…and an automation that triggers off any changes to the lat/long of your entity and updates the device tracker. An example of this:
Thank you for your reply. I have looked at quite a few different solutions, but some are already outdated and depreciated, for example, known_devices.yaml.
In the official documentation for device_tracker in the example the netgear platform.
# Example configuration.yaml entry for Netgear device
- platform: netgear
But I don’t understand which platform I need to use for my case?
known_devices.yaml still works fine. It’s just not used by new integrations, but you’re not writing an integration.