Skip to content

Commit 4162664

Browse files
authored
Configuration variables: units (optional)
Added descriptions for units, and an example entry for configuration.yaml
1 parent ddc0ba2 commit 4162664

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/_components/sensor.google_travel_time.markdown

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Configuration variables:
3737
- **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).
3838
- **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.
3939
- **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.
40+
- **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:`.
4041

4142
##### {% linkable_title Dynamic Configuration %}
4243

@@ -58,6 +59,14 @@ sensor:
5859
api_key: XXXX_XXXXX_XXXXX
5960
origin: zone.home
6061
destination: Eddies House # Friendly name of a zone
62+
63+
# Tracking entity in imperial unit
64+
- platform: google_travel_time
65+
api_key: XXXX_XXXXX_XXXXX
66+
destination: zone.home
67+
options:
68+
units: imperial # 'metric' for Metric, 'imperial' for Imperial
69+
6170
```
6271

6372
#### {% linkable_title Entity Tracking %}

0 commit comments

Comments
 (0)