Parsing NMEA GPS for RV home location

Hi guys I really love your solution, and I learned a lot from this discussion.
On my search I found an integration for GPS SmartBoatInnovations/ha-smart0183serial: Smart Boat 0183 Serial Integration
Hope this information helps to ease your work.

For what it is worth, | float seems to be required above. :wink:

Developer tools > Template >


{% set old_lat = state_attr('zone.home', 'latitude') | float -%}
{% set old_long = state_attr('zone.home', 'longitude') | float  -%}
{% set new_lat = states('sensor.rv_position').split(',')[0].strip() | float  -%}
{% set new_long = states('sensor.rv_position').split(',')[1].strip() | float  -%}

  {{- 'old_lat :'}} {{ old_lat }}
  {{- '\nold_long:'}} {{ old_long }}
  {{- '\nnew_lat :' }} {{ new_lat }} 
  {{- '\nnew_long:' }} {{ new_long }}

      {{ not ((old_lat + 0.00005) < new_lat < (old_lat - 0.00005))  or
       not ((old_long + 0.0001) < new_long < (old_long - 0.0001)) }}

Heh?

Something (updates?) broke the serial interface?

$ pyserial-miniterm on Ubuntu 24.04
… still shows the data flowing in

Also noted: this worked on /dev/ttyUSB2 but not /dev/ttyUSB1
(yes; i have two of these cheap GPS:es)

Hmm: The log contains ALL data read from the serial port, but all of a sudden it stopped.
Trying this:

So, cleaning out ALL inactive content in configuration.yaml then
restarting first by reload, then entirely; and some time after that (NOT immediately)
/dev/ttyUSB0 (earlier USB2?) reads out the GPS once again.
Note:
/dev/ttyUSB1 is still stale, despite COPIED LINES (name and port changed).

The feel from this is that the config file is incredibly sensitive to any whitespace change(?!) has manifested itself.

Oh? What happened now, after re-inserting the physical connector…

Now suddenly BOTH serial ports DO work
Note: NO change to the config, no reload, …