mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 18:36:51 +00:00
Update MVG documentation (#5908)
* Update MVG documentation for latest changes
* ✏️ Correction based on review
This commit is contained in:
parent
7b4f60daaa
commit
bcc0734df4
@ -13,7 +13,6 @@ ha_release: 0.42
|
||||
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.
|
||||
|
||||
## {% linkable_title Configuration %}
|
||||
@ -36,7 +35,9 @@ Configuration variables:
|
||||
- **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'].
|
||||
- **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.
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
||||
### {% linkable_title Full configuration %}
|
||||
@ -55,8 +56,12 @@ sensor:
|
||||
timeoffset: 2
|
||||
- station: Sendlinger Tor
|
||||
lines: ['U2','U8']
|
||||
number: 5
|
||||
- station: Scheidplatz
|
||||
products: ['U-Bahn']
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user