Custom object with custom attributes

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 device_tracker:

…and an automation that triggers off any changes to the lat/long of your entity and updates the device tracker. An example of this:

1 Like

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
    host: IP_ADDRESS
    username: YOUR_USERNAME
    interval_seconds: 10
    consider_home: 180
      track_new_devices: true

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.