Skip to content

Commit c540046

Browse files
mountainsandcodeballoob
authored andcommitted
Update mvglive documentation (home-assistant#2386)
* Update mvglive documentation * Update sensor.mvglive.markdown * Updated to correspond to code PR
1 parent 982e5f9 commit c540046

File tree

1 file changed

+21
-27
lines changed

1 file changed

+21
-27
lines changed

source/_components/sensor.mvglive.markdown

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,45 +22,39 @@ To enable this sensor, add the following lines to your `configuration.yaml` file
2222
# Example configuration.yaml entry
2323
sensor:
2424
- platform: mvglive
25-
station: STATION_OR_STOP
25+
nextdeparture:
26+
- station: STATION_OR_STOP_NAME
2627
```
2728
2829
Configuration variables:
2930
3031
- **station** (*Required*): Name of the stop or station. Visit [the MVG live web site](http://www.mvg-live.de) to find valid names.
31-
- **destination** (*Optional*): Name of the line's final destination to display only connections ending there.
32-
- **line** (*Optional*): Online display connections from this line, e.g. `'U6'`, `'S2'`.
33-
- **offset** (*Optional*): Do not display connections departing sooner than this number of minutes (defaults to 0). Useful if you are a couple of minutes away from the stop.
34-
- **bus** (*Optional*): If 'False', do not display bus connections
35-
- **tram** (*Optional*): If 'False', do not display tram connections
36-
- **ubahn** (*Optional*): If 'False', do not display U-Bahn (subway) connections
37-
- **sbahn** (*Optional*): If 'False', do not display S-Bahn (suburban train) connections
38-
32+
- **destinations** (*Optional*): One or multiple final stop names, e.g. 'Feldmoching' or ['Feldmoching','Harthof']. This can be used to only consider a particular direction of travel
33+
- **directions** (*Optional*): Filter by direction of the departure. For Tram, Bus, SEV, and S-Bahn, direction = direction. For U-Bahn trains, directions are more general. For U1, U2, U3 and U6, direction='1' indicates south-bound trains, direction='2' indicates northbound trains. For U4 and U5, direction='1' indicates east-bound trains, direction='2' indicates west-bound trains. For example, setting directions: '1' can be used to get all south-bound trains at Scheidplatz.
34+
- **lines** (*Optional*): One or more line numbers, e.g. 'U2' or ['U2','U8','N41']
35+
- **products** (*Optional*): One or more modes of transport, defaults to all 4 modes ['U-Bahn', 'Tram', 'Bus', 'S-Bahn'].
36+
- **timeoffset** (*Optional*): Do not display departures leaving sooner than this number of minutes (defaults to 0). Useful if you are a couple of minutes away from the stop.
37+
- **name** (*Optional*): You can customise the name of the sensor, which defaults to the station name.
3938
## {% linkable_title Examples %}
4039
4140
### {% linkable_title Full configuration %}
4241
43-
The example below shows a full configuration using the 'line' argument.
44-
45-
```yaml
46-
# Example configuration.yml entry
47-
sensor:
48-
- platform: mvglive
49-
station: Marienplatz
50-
line: U6
51-
offset: 5
52-
destination: Garching-Forschungszentrum
53-
```
54-
55-
Another example showing all bus connections at the main station.
42+
The example below shows a full configuration with three sensors that showcase the various configuration options.
5643
5744
```yaml
5845
# Example configuration.yml entry
5946
sensor:
6047
- platform: mvglive
61-
station: Hauptbahnhof
62-
offset: 2
63-
sbahn: False
64-
ubahn: False
65-
tram: False
48+
nextdeparture:
49+
- station: Hauptbahnhof
50+
name: Hbf
51+
destinations: ['München Flughafen Terminal','Markt Schwaben']
52+
products: 'S-Bahn'
53+
timeoffset: 2
54+
- station: Sendlinger Tor
55+
lines: ['U2','U8']
56+
- station: Scheidplatz
57+
products: ['U-Bahn']
58+
directions: '1'
6659
```
60+
The first sensor will return S-Bahn departures to Munich Airport or Markt Schwaben that are at least 2 minutes away. The second sensor returns U2 and U8 departures from Sendlinger Tor while the third sensor returns all south-bound U-Bahn trains from Scheidplatz.

0 commit comments

Comments
 (0)