Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.rmvtransport.sensor Namespace Reference

Classes

class  RMVDepartureData
 
class  RMVDepartureSensor
 

Functions

None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTRIBUTION = "Data provided by opendata.rmv.de"
 
string CONF_DESTINATIONS = "destinations"
 
string CONF_DIRECTION = "direction"
 
string CONF_LINES = "lines"
 
string CONF_MAX_JOURNEYS = "max_journeys"
 
string CONF_NEXT_DEPARTURE = "next_departure"
 
string CONF_PRODUCTS = "products"
 
string CONF_STATION = "station"
 
string CONF_TIME_OFFSET = "time_offset"
 
string DEFAULT_NAME = "RMV Journey"
 
dictionary ICONS
 
 PLATFORM_SCHEMA
 
 SCAN_INTERVAL = timedelta(seconds=60)
 
list VALID_PRODUCTS = ["U-Bahn", "Tram", "Bus", "S", "RB", "RE", "EC", "IC", "ICE"]
 

Detailed Description

Support for departure information for Rhein-Main public transport.

Function Documentation

◆ async_setup_platform()

None homeassistant.components.rmvtransport.sensor.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the RMV departure sensor.

Definition at line 86 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.rmvtransport.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 28 of file sensor.py.

◆ ATTRIBUTION

string homeassistant.components.rmvtransport.sensor.ATTRIBUTION = "Data provided by opendata.rmv.de"

Definition at line 57 of file sensor.py.

◆ CONF_DESTINATIONS

string homeassistant.components.rmvtransport.sensor.CONF_DESTINATIONS = "destinations"

Definition at line 33 of file sensor.py.

◆ CONF_DIRECTION

string homeassistant.components.rmvtransport.sensor.CONF_DIRECTION = "direction"

Definition at line 34 of file sensor.py.

◆ CONF_LINES

string homeassistant.components.rmvtransport.sensor.CONF_LINES = "lines"

Definition at line 35 of file sensor.py.

◆ CONF_MAX_JOURNEYS

string homeassistant.components.rmvtransport.sensor.CONF_MAX_JOURNEYS = "max_journeys"

Definition at line 38 of file sensor.py.

◆ CONF_NEXT_DEPARTURE

string homeassistant.components.rmvtransport.sensor.CONF_NEXT_DEPARTURE = "next_departure"

Definition at line 30 of file sensor.py.

◆ CONF_PRODUCTS

string homeassistant.components.rmvtransport.sensor.CONF_PRODUCTS = "products"

Definition at line 36 of file sensor.py.

◆ CONF_STATION

string homeassistant.components.rmvtransport.sensor.CONF_STATION = "station"

Definition at line 32 of file sensor.py.

◆ CONF_TIME_OFFSET

string homeassistant.components.rmvtransport.sensor.CONF_TIME_OFFSET = "time_offset"

Definition at line 37 of file sensor.py.

◆ DEFAULT_NAME

string homeassistant.components.rmvtransport.sensor.DEFAULT_NAME = "RMV Journey"

Definition at line 40 of file sensor.py.

◆ ICONS

dictionary homeassistant.components.rmvtransport.sensor.ICONS
Initial value:
1 = {
2  "U-Bahn": "mdi:subway",
3  "Tram": "mdi:tram",
4  "Bus": "mdi:bus",
5  "S": "mdi:train",
6  "RB": "mdi:train",
7  "RE": "mdi:train",
8  "EC": "mdi:train",
9  "IC": "mdi:train",
10  "ICE": "mdi:train",
11  "SEV": "mdi:checkbox-blank-circle-outline",
12  None: "mdi:clock",
13 }

Definition at line 44 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.rmvtransport.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_NEXT_DEPARTURE): [
4  {
5  vol.Required(CONF_STATION): cv.string,
6  vol.Optional(CONF_DESTINATIONS, default=[]): vol.All(
7  cv.ensure_list, [cv.string]
8  ),
9  vol.Optional(CONF_DIRECTION): cv.string,
10  vol.Optional(CONF_LINES, default=[]): vol.All(
11  cv.ensure_list, [cv.positive_int, cv.string]
12  ),
13  vol.Optional(CONF_PRODUCTS, default=VALID_PRODUCTS): vol.All(
14  cv.ensure_list, [vol.In(VALID_PRODUCTS)]
15  ),
16  vol.Optional(CONF_TIME_OFFSET, default=0): cv.positive_int,
17  vol.Optional(CONF_MAX_JOURNEYS, default=5): cv.positive_int,
18  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
19  }
20  ],
21  vol.Optional(CONF_TIMEOUT, default=10): cv.positive_int,
22  }
23 )

Definition at line 61 of file sensor.py.

◆ SCAN_INTERVAL

homeassistant.components.rmvtransport.sensor.SCAN_INTERVAL = timedelta(seconds=60)

Definition at line 59 of file sensor.py.

◆ VALID_PRODUCTS

list homeassistant.components.rmvtransport.sensor.VALID_PRODUCTS = ["U-Bahn", "Tram", "Bus", "S", "RB", "RE", "EC", "IC", "ICE"]

Definition at line 42 of file sensor.py.