#Binary Sensor as a device tracker

1 messages · Page 1 of 1 (latest)

warm gate
#

Trying to assign a presence sensor to a person to use as a device trackers. Does not have gps coordinates as it's just a binary sensor, on=home and off=away.

Is mqtt the best route for this? Haven't had muchuck adding a temate in the configuration.yaml file:

device_tracker:
  - platform: template
    trackers:
      adam_presence:
        value_template: >
          {% if is_state('binary_sensor.adam_presence', 'on') %}
            home
          {% else %}
            not_home
          {% endif %}

#People
person:
  - name: Adam
    id: adam
    user_id: adam
    device_trackers:
      - device_tracker.adam_presence
exotic gladeBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

orchid wedge
#

And it would help to explain what 'not much luck' means

warm gate
#

Sorry. Getting this error

Platform error 'device_tracker' from integration 'template' - Platform template.device_tracker not found

orchid wedge
#

Right, that's not a thing

#

You should use the device_tracker.see service to create and update a device tracker entity based on whatever you want