Get GPS from Address

Good morning, awesome people.

Anyone knows if its possible to get the GPS (latitude and longitude) from an address on HA?
I’d like to use Uber component to give the time and price to my next calendar event, but the calendar location is an address instead GPS.

Thank you! :slight_smile:

http://www.gpsvisualizer.com/geocode
https://www.latlong.net/convert-address-to-lat-long.html
you can try and use with a scrape sensor

What type of calendar is this? Typically, if you can get the calendar location into home assistant using the correct component, it will convert the address to gps location for you. That’s whats done with the waze_travel_time and google_travel_time component. Hell, you could just use the resource file from the waze_travel_time component to get the gps location. The api doesn’t require a login.

Hi @petro,

i’m using Google Calendar Event Component its returns Event Location as Address.

Yah, combine it with the google travel time component:

You can use any HA component to build a travel time. So you can you your device tracker and the location of the next google event and have it always display the travel time in HA:

sensor:
  # Tracking entity to entity
  - platform: google_travel_time
    name: Phone To Home
    api_key: XXXX_XXXXX_XXXXX
    origin: device_tracker.mobile_phone
    destination: sensor.google_calendar_event.attributes.location

You can also use waze, but currently it doesn’t have entity to entity travel times. You’d have to use the custom component I wrote. It should be built into HA soon as the PR is in the final stages.

@petro, I do use Google Maps Travel Time component.

The problem is that I want to use Uber component based on my Calendar Event Location and the Uber component uses GPS instead Address.

sensor:
  - platform: uber
  start_latitude: 37.8116380
  start_longitude: -122.2648050
  end_latitude: 37.7768520
  end_longitude: -122.4155500
  server_token: 'BeAPPTDsWZSHLf7fd9OWjZkIezweRw18Q8NltY27'
  product_ids:
    - '04a497f5-380d-47f2-bf1b-ad4cfdcb51f2'

You’ll never get this to work because of the limitations of the uber component. The uber component does not allow dynamic updates based on an entity ID, which is what you would need.

EDIT: You can hard code your locations, but getting a dynamic location to your device just won’t work with the base component.

1 Like