Template device_tracker

You can do this with the device_tracker.see service https://www.home-assistant.io/components/device_tracker/#device_trackersee-service

simple binary example

automation:
  - id: '123456789'
    alias: Custom Tracker
    trigger:
    - entity_id: binary_sensor.richard
      platform: state
    - event: start
      platform: homeassistant
    action:
    - data_template:
        dev_id: richard
        location_name: >
          {% if is_state('binary_sensor.richard', 'on') -%}
            home
          {%- else -%}
            not_home
          {%- endif %}
      service: device_tracker.see

credit goes to @apop from here: Device tracker from script?

to be clear just helping out @jensihnow so they are not stuck behind this feature request, I still agree a template device tracker would be more intuitive and canonical with other entity types.

5 Likes