Manual GPS location for other device trackers (zone conditions)

Hi,

I would propose an extension for other device tracker components like UniFi, nmap, DDWRT, etc., to be able to specify the GSP coordinates and radius of detection for that specific device tracker, so we can detect zone entering and exiting. Currently this is limited to iCloud and OwnTracks.

Example:
I have UniFi controller at home and at work, I would like for Home Assistant to be able to know via Zones that I’ve exited my home network, and when I have arrived at work. UniFi controller reports the list of clients, and knows when the client is gone or not, so only thing missing is the exact location of the device trackers. This is possible because they are static geographically.

Too bad that’s not a feature yet… I too would like to have static trackers (e.g. a remote openwrt monitoring a router somewhere) report that a person is at a custom location.
Are there ways around it?

I experience this problem in that, when a person’s device_tracker is the Unifi source, they disappear from the Map widget because Unifi doesn’t populate a GPS attribute.
I currently have to work around it with an automation, but it fires very often and clogs up the Logbook :frowning:

alias: Home Device Tracker
description: ""
trigger:
  - platform: state
    entity_id:
      - device_tracker.galaxy_s9
      - device_tracker.tripppadd
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition:
  - condition: template
    value_template: "{{ is_state(trigger.from_state.entity_id, 'home') }}"
action:
  - service: python_script.set_state
    data_template:
      entity_id: "{{ trigger.from_state.entity_id }}"
      latitude: 37.307758
      longitude: -121.891029
mode: queued