User can make own device_tracker

Call a service:

      service: device_tracker.see
      data:
        dev_id: fake_tracker
        gps:
          - 55
          - 55
        gps_accuracy: 10

And see a new entity created:

which can be shown on a Map:

Means - there is no need to use integrations creating virtual device_trackers.
I wonder - is it by a design?

I was going to say it probably doesn’t survive a restart but, surprise, it does.

Now that I have created it, I’m trying to find a way to delete it …

  • The entity doesn’t have a unique_id so it can’t be deleted via the UI.

image

  • It wasn’t created via YAML so there’s no configuration to delete.

  • It has no associated Device Tracker integration so it can’t be deleted via Settings → Devices & Services → Integrations → ???

I ended up manually deleting references to it in the following files and then restarting.

  • known_devices.yaml
  • homeassistant.exposed_entities

Given the challenge of deleting it, my guess is that the service call wasn’t meant for creating a device_tracker entity (because if it was, they overlooked to make it easy to delete the entity).

Thanks for a feedback.

Deleting here seems to be enough.

So far I see no harm from this manually created entity.
It can be used in some ways.

Noticed this behaviour recently:

  1. Installed a Virtual integration which created some “device_tracker.virtual_tracker” entity.
  2. Created an automation which moves this tracker to some random coords periodically.
  3. Uninstalled the Virtual integration.
  4. Got surprised that my tracker still exists.

Interesting. It wasn’t enough in my case, even after performing a Ctrl+F5 in my browser to ensure I wasn’t looking at cached data. It only disappeared after editing the JSON in the second file. Maybe my testing procedure was flawed and I saw a false positive some how. :man_shrugging: Anyways, I won’t be experimenting with that service call again.

There never was… you could just add manual entries to known_devices.yaml.

1 Like