Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for Google Travel Time."""
2 
3 DOMAIN = "google_travel_time"
4 
5 ATTRIBUTION = "Powered by Google"
6 
7 CONF_DESTINATION = "destination"
8 CONF_OPTIONS = "options"
9 CONF_ORIGIN = "origin"
10 CONF_TRAVEL_MODE = "travel_mode"
11 CONF_AVOID = "avoid"
12 CONF_UNITS = "units"
13 CONF_ARRIVAL_TIME = "arrival_time"
14 CONF_DEPARTURE_TIME = "departure_time"
15 CONF_TRAFFIC_MODEL = "traffic_model"
16 CONF_TRANSIT_MODE = "transit_mode"
17 CONF_TRANSIT_ROUTING_PREFERENCE = "transit_routing_preference"
18 CONF_TIME_TYPE = "time_type"
19 CONF_TIME = "time"
20 
21 ARRIVAL_TIME = "Arrival Time"
22 DEPARTURE_TIME = "Departure Time"
23 TIME_TYPES = [ARRIVAL_TIME, DEPARTURE_TIME]
24 
25 DEFAULT_NAME = "Google Travel Time"
26 
27 ALL_LANGUAGES = [
28  "ar",
29  "bg",
30  "bn",
31  "ca",
32  "cs",
33  "da",
34  "de",
35  "el",
36  "en",
37  "es",
38  "eu",
39  "fa",
40  "fi",
41  "fr",
42  "gl",
43  "gu",
44  "hi",
45  "hr",
46  "hu",
47  "id",
48  "it",
49  "iw",
50  "ja",
51  "kn",
52  "ko",
53  "lt",
54  "lv",
55  "ml",
56  "mr",
57  "nl",
58  "no",
59  "pl",
60  "pt",
61  "pt-BR",
62  "pt-PT",
63  "ro",
64  "ru",
65  "sk",
66  "sl",
67  "sr",
68  "sv",
69  "ta",
70  "te", # codespell:ignore te
71  "th",
72  "tl",
73  "tr",
74  "uk",
75  "vi",
76  "zh-CN",
77  "zh-TW",
78 ]
79 
80 AVOID_OPTIONS = ["tolls", "highways", "ferries", "indoor"]
81 TRANSIT_PREFS = ["less_walking", "fewer_transfers"]
82 TRANSPORT_TYPES = ["bus", "subway", "train", "tram", "rail"]
83 TRAVEL_MODES = ["driving", "walking", "bicycling", "transit"]
84 TRAFFIC_MODELS = ["best_guess", "pessimistic", "optimistic"]
85 
86 # googlemaps library uses "metric" or "imperial" terminology in distance_matrix
87 UNITS_METRIC = "metric"
88 UNITS_IMPERIAL = "imperial"
89 UNITS = [UNITS_METRIC, UNITS_IMPERIAL]