Skip to content

Commit ee1c05e

Browse files
cgtobifrenck
authored andcommitted
Add documentation for new RMV public transport sensor (home-assistant#5947)
* Initial documentation for the rmvtransport sensor. * Fix name * Fix typo * Added missing variable description for max number of journeys. * Minor wording fix * Fix setting names after code change. * Use configuration tag syntax. * Add logo. * Update logo file name. * Fix liquid syntax error. * Fix config setting name. * ✏️ Markdown tweaks
1 parent 8ff94bf commit ee1c05e

File tree

2 files changed

+101
-0
lines changed

2 files changed

+101
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
layout: page
3+
title: "RMV"
4+
description: "Instructions on how to integrate Rhein-Main public transport departure times into Home Assistant."
5+
date: 2018-08-02 22:00
6+
sidebar: true
7+
comments: false
8+
sharing: true
9+
footer: true
10+
logo: RMV.png
11+
ha_category: Transport
12+
ha_release: 0.76
13+
ha_iot_class: "Cloud Polling"
14+
---
15+
16+
The `rvmtransport` sensor will give you the departure time of the next bus, tram, subway, or train at the next station or stop in the Rhein-Main area public transport network. Additional details such as the line number and destination are present in the attributes.
17+
18+
## {% linkable_title Configuration %}
19+
20+
To enable this sensor, add the following lines to your `configuration.yaml` file:
21+
22+
```yaml
23+
# Example configuration.yaml entry
24+
sensor:
25+
- platform: rmvtransport
26+
next_departure:
27+
- station: STATION_OR_STOP_ID
28+
```
29+
30+
{% configuration %}
31+
name:
32+
description: Name to use in the frontend.
33+
required: false
34+
default: The default is the station name.
35+
type: string
36+
stationId:
37+
description: ID of the stop or station, e.g. 3000010. Visit [the RMV OpenData web site](https://opendata.rmv.de) to find a list of valid IDs.
38+
required: true
39+
type: string
40+
destinations:
41+
description: "One or multiple final stop names, e.g., 'Frankfurt (Main) Hauptbahnhof' or ['Frankfurt (Main) Hauptbahnhof','Frankfurt (Main) Stadion']. This can be used to only consider a particular direction of travel."
42+
required: false
43+
type: [string]
44+
lines:
45+
description: "One or more line numbers, e.g., `'S8'` or `['S8', 'RB33', '41']`"
46+
required: false
47+
default: The default is the station name.
48+
type: [string, int]
49+
products:
50+
description: "One or more modes of transport `['U-Bahn', 'Tram', 'Bus', 'S-Bahn', 'RB', 'RE', 'EC', 'IC', 'ICE']`."
51+
required: false
52+
default: Defaults to all.
53+
type: [string]
54+
time_offset:
55+
description: Do not display departures leaving sooner than this number of minutes. Useful if you are a couple of minutes away from the stop.
56+
required: false
57+
default: The defaults is 0.
58+
type: int
59+
max_journeys:
60+
description: Specify the maximal number of journeys.
61+
required: false
62+
default: The default is 5.
63+
type: string
64+
{% endconfiguration %}
65+
66+
## {% linkable_title Examples %}
67+
68+
### {% linkable_title Full configuration %}
69+
70+
The example below shows a full configuration with three sensors that showcase the various configuration options.
71+
72+
```yaml
73+
# Example configuration.yaml entry
74+
sensor:
75+
- platform: rmvtransport
76+
next_departure:
77+
- station: 3000010
78+
time_offset: 5
79+
destinations:
80+
- 'Frankfurt (Main) Flughafen Regionalbahnhof'
81+
- 'Frankfurt (Main) Stadion'
82+
products:
83+
- 'RB'
84+
- 'RE'
85+
- 'Bus'
86+
- 'S'
87+
- station: 3006907
88+
products: 'Bus'
89+
destinations: ['Wiesbaden Dernsches Gelände', 'Mainz Hauptbahnhof']
90+
name: Destination
91+
- station: 3006904
92+
lines: 'S8'
93+
max_journeys: 5
94+
products: 'S'
95+
```
96+
97+
The first sensor will return S-Bahn, bus, RB and RE trains departures from Frankfurt Hauptbahnhof to Frankfurt Airport or Stadium that are at least 5 minutes away.
98+
99+
The second sensor returns bus departures from Wiesbaden Hauptbahnhof going to Dernsches Gelände and Mainz Hauptbahnhof. To retrieve the time of the second departure, you would use states.sensor.ENTITY_NAME.attributes.departures[1].time.
100+
101+
The third sensor returns all S-Bahn trains from Mainz Hauptbahnhof for line S8.
12.7 KB
Loading

0 commit comments

Comments
 (0)