From 7e2c90d1794f79995ca599c08d219efde069b81d Mon Sep 17 00:00:00 2001 From: qrionic labs Date: Mon, 13 Feb 2017 11:39:54 +0100 Subject: [PATCH] Update sensor.google_travel_time.markdown Added mode option. Also the doc metadata was corrupt at line 36. Remove the corrupt metadata and simplified it. In their official api docs, Google calls them "Travel Modes": https://developers.google.com/maps/documentation/javascript/directions#TravelModes --- source/_components/sensor.google_travel_time.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/_components/sensor.google_travel_time.markdown b/source/_components/sensor.google_travel_time.markdown index 16c08a70988..4fb24f39d07 100644 --- a/source/_components/sensor.google_travel_time.markdown +++ b/source/_components/sensor.google_travel_time.markdown @@ -33,8 +33,9 @@ Configuration variables: - **api_key** (*Required*): Your application's API key (get one by following the instructions above). This key identifies your application for purposes of quota management. - **origin** (*Required*): The starting point for calculating travel distance and time. You can supply one or more locations separated by the pipe character, in the form of an address, latitude/longitude coordinates, or a [Google place ID](https://developers.google.com/places/place-id). When specifying the location using a Google place ID, the ID must be prefixed with `place_id:`. - **destination** (*Required*): One or more locations to use as the finishing point for calculating travel distance and time. The options for the destinations parameter are the same as for the origins parameter, described above. -- **name** (*Optional*): A name to display on the sensor. The default is "Google Travel Time - " where transit mode is the mode set in options for the sensor (if no mode is set, the default is driving). +- **name** (*Optional*): A name to display on the sensor. The default is "Google Travel Time - [Travel Mode]" where [Travel Mode] is the mode set in options for the sensor (see option "mode" below). - **options** (*Optional*): A dictionary containing parameters to add to all requests to the Distance Matrix API. A full listing of available options can be found [here](https://developers.google.com/maps/documentation/distance-matrix/intro#RequestParameters). + - **mode** (*Optional*): The travel mode used to calculate the directions / time. Can be `driving` (*Default*), `bicycling`, `transit` or `walking`. - **departure_time** (*Optional*): Can be `now`, a Unix timestamp, or a 24 hour time string like `08:00:00`. If you provide a time string, it will be combined with the current date to get travel time for that moment. - **arrival_time** (*Optional*): See notes above for `departure_time`. `arrival_time` can not be `now`, only a Unix timestamp or time string. You can not provide both `departure_time` and `arrival_time`. If you do provide both, `arrival_time` will be removed from the request. - **units** (*Optional*): Set the unit for the sensor in metric or imperial, otherwise the default unit the same as the unit set in `unit_system:`.