mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Update mvglive documentation (#2386)
* Update mvglive documentation * Update sensor.mvglive.markdown * Updated to correspond to code PR
This commit is contained in:
parent
982e5f9639
commit
c540046c7f
@ -22,45 +22,39 @@ To enable this sensor, add the following lines to your `configuration.yaml` file
|
|||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
sensor:
|
sensor:
|
||||||
- platform: mvglive
|
- platform: mvglive
|
||||||
station: STATION_OR_STOP
|
nextdeparture:
|
||||||
|
- station: STATION_OR_STOP_NAME
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
Configuration variables:
|
||||||
|
|
||||||
- **station** (*Required*): Name of the stop or station. Visit [the MVG live web site](http://www.mvg-live.de) to find valid names.
|
- **station** (*Required*): Name of the stop or station. Visit [the MVG live web site](http://www.mvg-live.de) to find valid names.
|
||||||
- **destination** (*Optional*): Name of the line's final destination to display only connections ending there.
|
- **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
|
||||||
- **line** (*Optional*): Online display connections from this line, e.g. `'U6'`, `'S2'`.
|
- **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.
|
||||||
- **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.
|
- **lines** (*Optional*): One or more line numbers, e.g. 'U2' or ['U2','U8','N41']
|
||||||
- **bus** (*Optional*): If 'False', do not display bus connections
|
- **products** (*Optional*): One or more modes of transport, defaults to all 4 modes ['U-Bahn', 'Tram', 'Bus', 'S-Bahn'].
|
||||||
- **tram** (*Optional*): If 'False', do not display tram connections
|
- **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.
|
||||||
- **ubahn** (*Optional*): If 'False', do not display U-Bahn (subway) connections
|
- **name** (*Optional*): You can customise the name of the sensor, which defaults to the station name.
|
||||||
- **sbahn** (*Optional*): If 'False', do not display S-Bahn (suburban train) connections
|
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
|
|
||||||
### {% linkable_title Full configuration %}
|
### {% linkable_title Full configuration %}
|
||||||
|
|
||||||
The example below shows a full configuration using the 'line' argument.
|
The example below shows a full configuration with three sensors that showcase the various configuration options.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yml entry
|
# Example configuration.yml entry
|
||||||
sensor:
|
sensor:
|
||||||
- platform: mvglive
|
- platform: mvglive
|
||||||
station: Marienplatz
|
nextdeparture:
|
||||||
line: U6
|
- station: Hauptbahnhof
|
||||||
offset: 5
|
name: Hbf
|
||||||
destination: Garching-Forschungszentrum
|
destinations: ['München Flughafen Terminal','Markt Schwaben']
|
||||||
```
|
products: 'S-Bahn'
|
||||||
|
timeoffset: 2
|
||||||
Another example showing all bus connections at the main station.
|
- station: Sendlinger Tor
|
||||||
|
lines: ['U2','U8']
|
||||||
```yaml
|
- station: Scheidplatz
|
||||||
# Example configuration.yml entry
|
products: ['U-Bahn']
|
||||||
sensor:
|
directions: '1'
|
||||||
- platform: mvglive
|
|
||||||
station: Hauptbahnhof
|
|
||||||
offset: 2
|
|
||||||
sbahn: False
|
|
||||||
ubahn: False
|
|
||||||
tram: False
|
|
||||||
```
|
```
|
||||||
|
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user