Update MVG documentation (#5908)

* Update MVG documentation for latest changes

* ✏️ Correction based on review
This commit is contained in:
mountainsandcode 2018-07-30 11:18:18 +02:00 committed by Franck Nijhof
parent 7b4f60daaa
commit bcc0734df4

View File

@ -13,7 +13,6 @@ ha_release: 0.42
ha_iot_class: "Cloud Polling" ha_iot_class: "Cloud Polling"
--- ---
The `mvglive` sensor will give you the departure time of the next bus, tram, subway, or train at the next station or stop in the Munich public transport network. Additional details such as the line number and destination are present in the attributes. The `mvglive` sensor will give you the departure time of the next bus, tram, subway, or train at the next station or stop in the Munich public transport network. Additional details such as the line number and destination are present in the attributes.
## {% linkable_title Configuration %} ## {% linkable_title Configuration %}
@ -36,7 +35,9 @@ Configuration variables:
- **lines** (*Optional*): One or more line numbers, e.g., 'U2' or ['U2','U8','N41'] - **lines** (*Optional*): One or more line numbers, e.g., 'U2' or ['U2','U8','N41']
- **products** (*Optional*): One or more modes of transport, defaults to all 4 modes ['U-Bahn', 'Tram', 'Bus', 'S-Bahn']. - **products** (*Optional*): One or more modes of transport, defaults to all 4 modes ['U-Bahn', 'Tram', 'Bus', 'S-Bahn'].
- **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. - **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.
- **number** (*Optional*): Store a list of departures in the attribute "departures", defaults to 1. If you set this parameter to 3, the next three departures will be stored.
- **name** (*Optional*): You can customize the name of the sensor, which defaults to the station name. - **name** (*Optional*): You can customize the name of the sensor, which defaults to the station name.
## {% linkable_title Examples %} ## {% linkable_title Examples %}
### {% linkable_title Full configuration %} ### {% linkable_title Full configuration %}
@ -55,8 +56,12 @@ sensor:
timeoffset: 2 timeoffset: 2
- station: Sendlinger Tor - station: Sendlinger Tor
lines: ['U2','U8'] lines: ['U2','U8']
number: 5
- station: Scheidplatz - station: Scheidplatz
products: ['U-Bahn'] products: ['U-Bahn']
directions: '1' directions: '1'
``` ```
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.
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 and stores a total of 5 departures in attributes. To retrieve the time until the second departure, you would use states.sensor.ENTITY_NAME.attributes.departures[1].time.
The third sensor returns all south-bound U-Bahn trains from Scheidplatz.