Automatically updating my home location using the GPS from a tablet -

I live on a boat and as such I need to automate updating my Home location.

I have a tablet that I can see the GPS information on through HA

How can I automatically update my location using the device tracker. Only needs to run once a day.

I’ve only had HA a week. Please be gentle. I only. Managed to get all my devices recognised today.

There is a service that can be used to change the location of the home zone:

3 Likes

Did not know that, thanks!

Should be a straightforward automation then. The automation in the linked post updates whenever it changes. If you only want to do it once per day for whatever reason:

alias: Update home zone
trigger:
  - platform: time
    at: "02:00:00"
action:
  - service: homeassistant.set_location
    data:
      latitude: "{{ state_attr('device_tracker.YOUR_TABLET', 'latitude') }}"
      longitude: "{{ state_attr('device_tracker.YOUR_TABLET', 'longitude') }}"

You are a legend. This will be my first attempt at this type of thing. So thanks so much.

OK, I have to ask… What can you automate on a boat?

A bilge alarm notification.
Engine alarm notifications.
Security alarm when moored.
Navigation lights on at dusk off at dawn, if moving.
Interior lighting.
Energy tracking (solar, wind, engine battery charging).

All of that and my pellet stove.

I used to follow a youtube channel about Home Assistant on a yacht. It was quite interesting. Unfortunately they took the channel down after an attempted targeted attack on their system.

1 Like

We just can’t have nice things can we.

It’s working! Now beginning to understand how this thing works. I’ve taken my first step. Thanks so much.

1 Like

Thanks for this. I have been working on making my camper smart, and this is one thing I absolutely wanted to do. I realized that my Verizon Mifi has a built in NMEA GPS stream/server. I now have an automation run every 30 minutes - if HA is connected through the Mifi, it pulls latitude, longitude and altitude data from the Mifi and updates the home location accordingly. When I get home and switch back to the home network, another automation resets my home location.