920d298c7e117cb9b83e3489df5d40860b5d334b,homeassistant/components/sensor/mvglive.py,,setup_platform,#Any#Any#Any#Any#,47

Before Change


    station = config.get(CONF_STATION)
    destination = config.get(CONF_DEST)
    line = config.get(CONF_LINE)
    offset = config.get(CONF_OFFSET)
    ubahn = config.get(CONF_UBAHN)
    tram = config.get(CONF_TRAM)
    bus = config.get(CONF_BUS)
    sbahn = config.get(CONF_SBAHN)

After Change



def setup_platform(hass, config, add_devices, discovery_info=None):
    Get the MVGLive sensor.
    sensors = []
    for nextdeparture in config.get(CONF_NEXT_DEPARTURE):
        sensors.append(
            MVGLiveSensor(
                nextdeparture.get(CONF_STATION),
                nextdeparture.get(CONF_DESTINATIONS),
                nextdeparture.get(CONF_DIRECTIONS),
                nextdeparture.get(CONF_LINES),
                nextdeparture.get(CONF_PRODUCTS),
                nextdeparture.get(CONF_TIMEOFFSET),
                nextdeparture.get(CONF_NAME)))
    add_devices(sensors, True)


// pylint: disable=too-few-public-methods
class MVGLiveSensor(Entity):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: home-assistant/home-assistant
Commit Name: 920d298c7e117cb9b83e3489df5d40860b5d334b
Time: 2017-04-20
Author: mountainsandcode@icloud.com
File Name: homeassistant/components/sensor/mvglive.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 920d298c7e117cb9b83e3489df5d40860b5d334b
Time: 2017-04-20
Author: mountainsandcode@icloud.com
File Name: homeassistant/components/sensor/mvglive.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: b4899ec46902741a209788d05cbc2214fcc391e7
Time: 2016-10-31
Author: mail@fabian-affolter.ch
File Name: homeassistant/components/sensor/yahoo_finance.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 84c72ebf634e0f89c381b46b44e9d050a053b9d0
Time: 2015-10-11
Author: todd@ingarfield.com
File Name: homeassistant/components/thermostat/radiotherm.py
Class Name:
Method Name: setup_platform