Google travel Time configuration in

Hi,

I am trying to use below config for integrating Google travel time in my home assistant.
I get error while testing the yaml file.

sensor:
- platform: google_travel_time
api_key: XXXX_XXXX
origin: “Trondheim, Norway”
destination: “Paris, France”

C:\Windows\system32>hass --script check_config
Testing configuration at C:\Users\ekaudhi\AppData\Roaming.homeassistant
←[31m2017-08-23 20:53:44 ERROR (SyncWorker_0) [homeassistant.util.yaml] mapping
values are not allowed here
in “C:\Users\ekaudhi\AppData\Roaming.homeassistant\configuration.yaml”, line
53, column 15←[0m
←[31m2017-08-23 20:53:44 ERROR (MainThread) [homeassistant.bootstrap] Error load
ing C:\Users\ekaudhi\AppData\Roaming.homeassistant\configuration.yaml: mapping
values are not allowed here
in “C:\Users\ekaudhi\AppData\Roaming.homeassistant\configuration.yaml”, line
53, column 15←[0m

Can some let me know what is the error in my file.

Is it formatted like so:…

sensor:
  - platform: google_travel_time
    api_key: XXXX_XXXXX_XXXXX
    origin: Trondheim, Norway
    destination: Paris, France

If it isn’t formatted as above yaml won’t like it note they are spaces not tabs.

Do you have other sensors?

1 Like

Thanks it worked perfect.

1 Like

:slight_smile: Glad to hear it :slight_smile:

@keithh666 I keep getting invalid config

Google maps travel times

sensor:
  - platform: google_travel_time
    api_key: xxxxxxxxxxxx
    origin: xxxxxxxxxxxxxx
    destination: xxxxxxxxxxxxxxxx

What does the log say?

starting version 3.2.4 Testing configuration at /config ERROR:homeassistant.util.yaml:YAML file /config/configuration.yaml contains duplicate key "sensor". Check lines 62 and 69.
1:36 PM components/hassio/__init__.py (ERROR)
YAML file /config/configuration.yaml contains duplicate key "sensor". Check lines 62 and 69.
1:35 PM util/yaml.py (ERROR)

I also have a weather prediction sensor

So if you have them both in config.yaml, then you need to either use 1 sensor definition and group your sensors under it or name them sensor 1: and sensor 2: etc

1 Like

Aha! I tried naming them sensor1 and sensor2. It needs a space!

Thank you

1 Like