Device_tracker.template

maybe there is, maybe not…

Is there an option to have a “device_tracker.template”?

use case:

in node red and other automations I have eg. device_tracker.sm908e as my phone entity. but when I get a new phone I get a new entity.

Now when I have a template or helper that is as follows:

device_tracker.person1

  • device_tracker.sm908e

device_tracker.person2

  • device_tracker.sm501e

Is that in any way easily possible?

so in automations i use the top entity and can easily replace the device entity?

Hello sender,

This is the format for that.

You happen to have anexample because that creates a new entity yes, but I want to create an entity from another entity… dont see that there?

The action creates the entity automatically based on the value of dev_id if a matching device_tracker entity doesn’t already exist… So, if device_tracker.person_1 doesn’t exist the following will create the entity and set its state to “home”, if the tracker does exist it will just set its state to “home”:

- service: device_tracker.see
  data:
    dev_id: person_1
    location_name: home

FWIW, there is a custom integration that you may want to consider.