GPS Component

The gps component allows you to connect GPS modules to your ESPHome project. Any GPS module that uses the standardized NMEA communication protocol will work.

../_images/gps-full.jpg

GPS Module. Image by Adafruit

For this integration to work you need to have set up a UART bus in your configuration - only the RX pin should be necessary.

# Example configuration entry
uart:
  rx_pin: D7
  baud_rate: 9600

# Declare GPS module
gps:
  latitude:
    name: "Latitude"
  longitude:
    name: "Longitude"
  altitude:
    name: "Altitude"

# GPS as time source
time:
  - platform: gps

The component is split up in platforms, by defining the GPS module (as seen above).

In addition to retrieving GPS position data, the module can also be used as a time platform to get the current date and time via the very accurate GPS clocks without a network connection.

See GPS Time Source for config options for the GPS time source.

Configuration variables:

  • latitude (Optional): Include the Latitude as a sensor

    • name (Required, string): The name to give the latitude sensor

    • id (Optional, ID): Set the ID of this sensor for use in lambdas.

    • All other options from Sensor.

  • longitude (Optional): Include the Longitude as a sensor

    • name (Required, string): The name to give the longitude sensor

    • id (Optional, ID): Set the ID of this sensor for use in lambdas.

    • All other options from Sensor.

  • speed (Optional): Include the measured speed as a sensor

    • name (Required, string): The name to give the speed sensor

    • id (Optional, ID): Set the ID of this sensor for use in lambdas.

    • All other options from Sensor.

  • course (Optional): Include the measured course as a sensor

    • name (Required, string): The name to give the course sensor

    • id (Optional, ID): Set the ID of this sensor for use in lambdas.

    • All other options from Sensor.

  • altitude (Optional): Include the measured altitude as a sensor

    • name (Required, string): The name to give the altitude sensor

    • id (Optional, ID): Set the ID of this sensor for use in lambdas.

    • All other options from Sensor.

  • satellites (Optional): Include the number of tracking satellites being used as a sensor

    • name (Required, string): The name to give the tracking satellites sensor

    • id (Optional, ID): Set the ID of this sensor for use in lambdas.

    • All other options from Sensor.

See Also