I updated the GPSD client, here's the code

I picked up a GLiNet C3000 cellular modem that has a built in GPS antenna and can run GPSD (as it runs OpenWRT), found this old addon and got it updated to work with later versions of HA.

Make your config look something like this:

sensor:
  - platform: gpsd_client
    name: GPSD Client
    host: 10.0.0.1
    port: 2947
  - platform: template
    sensors:
      gpsd_latitude:
        friendly_name: "GPS Latitude"
        value_template: "{{ state_attr('sensor.gpsd_client', 'latitude') | float }}"
      gpsd_longitude:
        friendly_name: "GPS Longitude"
        value_template: "{{ state_attr('sensor.gpsd_client', 'longitude') | float }}"
      gpsd_speed:
        friendly_name: "GPS Speed"
        value_template: "{{ state_attr('sensor.gpsd_client', 'speed') | float }}"
  - platform: template
    sensors:
      # Clean formatting for GPS values
      gps_latitude_clean:
        friendly_name: "GPS Latitude"
        value_template: >
          {{ (states("sensor.gpsd_latitude")) | round(3) }}
      gps_longitude_clean:
        friendly_name: "GPS Longitude"
        value_template: >
          {{ (states("sensor.gpsd_longitude")) | round(3) }}

And then you can use this automation to update your home assistant location automagically

alias: Set Location
description: ""
trigger:
  - platform: time_pattern
    minutes: /15
condition: []
action:
  - service: homeassistant.set_location
    data_template:
      latitude: |
        {{ states("sensor.gps_latitude_clean") }}
      longitude: |
        {{ states("sensor.gps_longitude_clean") }}
mode: single

There’s an auto timezone addon out there also, but I can’t get it working so far.

This blog helped me out:

And I like the windy integration:

Your post was great and I finally got it working after resolving a number of issues with “other” stuff. HACS wouldn’t let me install the repo and so had to install manually. Also the GLiNet AX3000 wasn’t producing GPS data until I corrected the antenna setup.

Others might find it useful to know that you can run “gpsmon” on your router to validat e that the data is being produced correctly. If its not updating with lots of data, you have got somrthing wrong. My issue was that i’m using a Pepwave 40G and had connected the antenna labeled GPS to the GNSS port on the router when I should have connected the 4th mimo cable and not used the GPS cable at all.

Also I got configuration errors from HA with the template config and updated “float” to “float(0)” to provide it with a default:

sensor:
  - platform: gpsd_client
    name: GPSD Client
    host: 10.0.0.1
    port: 2947
  - platform: template
    sensors:
      gpsd_latitude:
        friendly_name: "GPS Latitude"
        value_template: "{{ state_attr('sensor.gpsd_client', 'latitude') | float(0) }}"
      gpsd_longitude:
        friendly_name: "GPS Longitude"
        value_template: "{{ state_attr('sensor.gpsd_client', 'longitude') | float(0) }}"
      gpsd_speed:
        friendly_name: "GPS Speed"
        value_template: "{{ state_attr('sensor.gpsd_client', 'speed') | float(0) }}"
  - platform: template
    sensors:
      # Clean formatting for GPS values
      gps_latitude_clean:
        friendly_name: "GPS Latitude"
        value_template: >
          {{ (states("sensor.gpsd_latitude")) | round(3) }}
      gps_longitude_clean:
        friendly_name: "GPS Longitude"
        value_template: >
          {{ (states("sensor.gpsd_longitude")) | round(3) }}

Also here are links to the commands to get the GLiNet AX3000 working:

And some additional commands that I found useful:

I hope this helps someone else.