Location tracking with external Owntracks server

Hello,

I have a working owntracks system on a server outside my home LAN. I have been looking att the owntracks integration for HA and found this example configuration:

# Example configuration.yaml entry
owntracks:
  max_gps_accuracy: 200
  waypoints: true
  mqtt_topic: "owntracks/#"
  events_only: true
  waypoint_whitelist:
    - jon
    - ram
  region_mapping:
    cabin: home
    office: work

I can’t see how I could specify a hostname or IP address of a mqtt broker, is there some way to use the location information for an external owntracks system in HA ? I do lot like to use HA as my main owntracks system because I can’t allow access to it from the phone app. So configuring the phone to report to HA is not an option. I am looking for a way that HA can use the existing owntracks mqtt broker.

Any help would be appreciated.
Thanks
Jan

After some more reading about the mosquitto broker I have come across the “connection” configuration. It seems to work now the way I intended. On the OwnTracks system I added a connections.conf file to the /etc/mosquitto/conf.d directory containing the following:

connection OT-2-Home-Broker
address <IP-Addess-home-broker>
remote_username <user>
remote_password <pass>
cleansession true
topic owntracks/#

I can see the topics now on the home mqtt broker and it seems that HA is also seeing the values from the topic. Now trying to figure out how I can base automations on my location.

Kind Regards
Jan