home-assistant.io/source/_components/sensor.mvglive.markdown
2017-03-26 19:08:53 +02:00

2.1 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release, ha_iot_class
layout title description date sidebar comments sharing footer logo ha_category ha_release ha_iot_class
page MVG Instructions how to integrate Munich public transport departure times into Home Assistant. 2017-03-21 20:00 true false true true mvg.png Transport 0.42 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.

To enable this sensor, add the following lines to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: mvglive
    station: STATION_OR_STOP

Configuration variables:

  • station (Required): Name of the stop or station. Visit the MVG live web site to find valid names.
  • destination (Optional): Name of the line's final destination to display only connections ending there.
  • line (Optional): Online display connections from this line, e.g. 'U6', 'S2'.
  • 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.
  • bus (Optional): If 'False', do not display bus connections
  • tram (Optional): If 'False', do not display tram connections
  • ubahn (Optional): If 'False', do not display U-Bahn (subway) connections
  • sbahn (Optional): If 'False', do not display S-Bahn (suburban train) connections

{% linkable_title Examples %}

{% linkable_title Full configuration %}

The example below shows a full configuration using the 'line' argument.

# Example configuration.yml entry
sensor:
  - platform: mvglive
    station: Marienplatz
    line: U6
    offset: 5
    destination: Garching-Forschungszentrum

Another example showing all bus connections at the main station.

# Example configuration.yml entry
sensor:
  - platform: mvglive
    station: Hauptbahnhof
    offset: 2
    sbahn: False
    ubahn: False
    tram: False