Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the swiss_public_transport integration."""
2 
3 from typing import Final
4 
5 DOMAIN = "swiss_public_transport"
6 
7 CONF_DESTINATION: Final = "to"
8 CONF_START: Final = "from"
9 CONF_VIA: Final = "via"
10 CONF_TIME_STATION: Final = "time_station"
11 CONF_TIME_MODE: Final = "time_mode"
12 CONF_TIME_FIXED: Final = "time_fixed"
13 CONF_TIME_OFFSET: Final = "time_offset"
14 
15 DEFAULT_NAME = "Next Destination"
16 DEFAULT_UPDATE_TIME = 90
17 DEFAULT_TIME_STATION = "departure"
18 DEFAULT_TIME_MODE = "now"
19 
20 MAX_VIA = 5
21 CONNECTIONS_COUNT = 3
22 CONNECTIONS_MAX = 15
23 IS_ARRIVAL_OPTIONS = ["departure", "arrival"]
24 TIME_MODE_OPTIONS = ["now", "fixed", "offset"]
25 
26 
27 PLACEHOLDERS = {
28  "stationboard_url": "http://transport.opendata.ch/examples/stationboard.html",
29  "opendata_url": "http://transport.opendata.ch",
30 }
31 
32 ATTR_CONFIG_ENTRY_ID: Final = "config_entry_id"
33 ATTR_LIMIT: Final = "limit"
34 
35 SERVICE_FETCH_CONNECTIONS = "fetch_connections"