Device tracker from input_boolean

I have my own presence detection working and save the state accordingly. How can I make a device tracker that matches this value?

Create an automation that handles sets a virtual device tracker to the state you want it to be:

- id: 1647348721
  alias: track davinci
  description: ''
  trigger: 
  - platform: state
    entity_id: sensor.davinci_present
  condition: []
  action:
  - chose: 
    - conditions:
      - condition: template
        value_template: '{{ states(''sensor.davinci_present'') == ''on'' }}'
      sequence:
      - service: device_tracker.see
        data:
          dev_id: davinci_tracker
          location_name: 'home'
    default:
    - service: device_tracker.see
      data:
        dev_id: davinci_tracker
        location_name: 'not_home'
mode: single
2 Likes

Thanks. How do I create/choose the davinci_tracker? In the GUI I can only set a status, but not to what.

In developer-tools,
devtools
choose services,
services
Then enter “Device tracker: See”, check for device_id and enter “davinci_tracker”, and check for location, and enter “home”


And press “Call service”

I think that should do it.

or just run the automation, I think that will be enough.

1 Like