Add direction configuration for RMVtransport component
diff --git a/homeassistant/components/sensor/rmvtransport.py b/homeassistant/components/sensor/rmvtransport.py
index 79ec8c7a5e782e..f9bd65c1a74f3c 100644
--- a/homeassistant/components/sensor/rmvtransport.py
+++ b/homeassistant/components/sensor/rmvtransport.py
@@ -24,7 +24,7 @@
 
 CONF_STATION = 'station'
 CONF_DESTINATIONS = 'destinations'
-CONF_DIRECTIONS = 'directions'
+CONF_DIRECTION = 'direction'
 CONF_LINES = 'lines'
 CONF_PRODUCTS = 'products'
 CONF_TIME_OFFSET = 'time_offset'
@@ -57,8 +57,7 @@
         vol.Required(CONF_STATION): cv.string,
         vol.Optional(CONF_DESTINATIONS, default=[]):
             vol.All(cv.ensure_list, [cv.string]),
-        vol.Optional(CONF_DIRECTIONS, default=[]):
-            vol.All(cv.ensure_list, [cv.string]),
+        vol.Optional(CONF_DIRECTION): cv.string,
         vol.Optional(CONF_LINES, default=[]):
             vol.All(cv.ensure_list, [cv.positive_int, cv.string]),
         vol.Optional(CONF_PRODUCTS, default=VALID_PRODUCTS):
@@ -84,7 +83,7 @@ async def async_setup_platform(hass, config, async_add_entities,
                 session,
                 next_departure[CONF_STATION],
                 next_departure.get(CONF_DESTINATIONS),
-                next_departure.get(CONF_DIRECTIONS),
+                next_departure.get(CONF_DIRECTION),
                 next_departure.get(CONF_LINES),
                 next_departure.get(CONF_PRODUCTS),
                 next_departure.get(CONF_TIME_OFFSET),
@@ -97,14 +96,14 @@ async def async_setup_platform(hass, config, async_add_entities,
 class RMVDepartureSensor(Entity):
     """Implementation of an RMV departure sensor."""
 
-    def __init__(self, session, station, destinations, directions, lines,
+    def __init__(self, session, station, destinations, direction, lines,
                  products, time_offset, max_journeys, name, timeout):
         """Initialize the sensor."""
         self._station = station
         self._name = name
         self._state = None
         self.data = RMVDepartureData(session, station, destinations,
-                                     directions, lines, products, time_offset,
+                                     direction, lines, products, time_offset,
                                      max_journeys, timeout)
         self._icon = ICONS[None]
 
@@ -167,7 +166,7 @@ async def async_update(self):
 class RMVDepartureData:
     """Pull data from the opendata.rmv.de web page."""
 
-    def __init__(self, session, station_id, destinations, directions, lines,
+    def __init__(self, session, station_id, destinations, direction, lines,
                  products, time_offset, max_journeys, timeout):
         """Initialize the sensor."""
         from RMVtransport import RMVtransport
@@ -175,7 +174,7 @@ def __init__(self, session, station_id, destinations, directions, lines,
         self.station = None
         self._station_id = station_id
         self._destinations = destinations
-        self._directions = directions
+        self._direction = direction
         self._lines = lines
         self._products = products
         self._time_offset = time_offset
@@ -189,6 +188,7 @@ async def async_update(self):
         try:
             _data = await self.rmv.get_departures(self._station_id,
                                                   products=self._products,
+                                                  directionId=self._direction,
                                                   maxJourneys=50)
         except ValueError:
             self.departures = []

## Description:
Implement direction configuration.

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#6646

## Checklist:
  - [x] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**

If user exposed functionality or configuration variables are added/changed:
  - [x] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [ ] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54
