Sensor google_travel_time is not working

Hello,

I’m newbie in home assistant, last week I started to configure an easy things and I’m improving my frontend and adding devices as I’m discovering or adding manually.

Today I found the google_travel_time sensor that I think could be useful for future automations and I though it would be really easy to configure but I just was able one time to see my sensor in the frontend, after that I tried with several configurations but I’m not able to make it works.

This was my first config (and the only one succesful):

sensor:

  • platform: google_travel_time
    api_key: XXXX_XXXXX_XXXXX - (I replaced this with my key)
    origin: Trondheim, Norway
    destination: Paris, France

Then I tried adding zones but didn’t work

  • platform: google_travel_time
    name: Home to work
    api_key: XXXXXXXXXXXXXX
    origin: zone.home
    destination: zone.iwork
    options:
    mode: transit

This is how I’m configuring zones:

zone:

  • name: iwork
    latitude: XXXXXXX
    longitude: XXXXXXX
    radius: 100

  • name: home
    latitude: XXXXXXXXXX
    longitude: XXXXXXXXX
    radius: 100

And as you see, I’m getting errors on my google distance API (just one was succesful, the first one)

I think I’m missing something but I don’t know what, is not a very complex config
Any thoughts?

Thank you in advance

I think you need to put your credit card in Google Cloud console

=O sounds reasonable, do you know If this api has a cost? I readed 2500 requests per day were free. I nedd to read a little bit more about the google policy.

you could try changing to the waze_travel_time component. You have to have an account with google, and the first xxxx requests are inclusive, but if you tip over, you start getting charged.

Yes but not sure is 2500.

Bering in doubt, and not wanting to pay, I switched to waze

Good option, I will take your advice, thank you guys

https://github.com/home-assistant/home-assistant/issues/16142

Hi guys.

I’m getting this error:

Platform error sensor.google_travel_time - cannot import name ‘SensorEntity’ from ‘homeassistant.components.sensor’ (/usr/src/homeassistant/homeassistant/components/sensor/init.py)

I created an API and also billing.