5fba67f6c37a7c36935e4f9cb227b21f1b7a1c7b,homeassistant/components/light/limitlessled.py,,setup_platform,#Any#Any#Any#Any#,51

Before Change


    import ledcontroller

    // Handle old configuration format:
    bridges = config.get("bridges", [config])

    for bridge_id, bridge in enumerate(bridges):
        bridge["id"] = bridge_id

    pool = ledcontroller.LedControllerPool([x["host"] for x in bridges])

    lights = []
    for bridge in bridges:
        for i in range(1, 5):

After Change


    legacy_setup(config, add_devices_callback)

    // Use the expanded configuration format.
    if "bridges" not in config:
        return
    lights = []
    for bridge_conf in config.get("bridges"):
        if "groups" not in bridge_conf:
            continue
        bridge = Bridge(bridge_conf.get("host"),
                        port=bridge_conf.get("port", DEFAULT_PORT),
                        version=bridge_conf.get("version", DEFAULT_VERSION))
        for group_conf in bridge_conf.get("groups"):
            group = bridge.add_group(group_conf.get("number"),
                                     group_conf.get("name"),
                                     group_conf.get("type", DEFAULT_LED_TYPE))
            lights.append(LimitlessLEDGroup.factory(group))
    add_devices_callback(lights)


def state(new_state):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: home-assistant/home-assistant
Commit Name: 5fba67f6c37a7c36935e4f9cb227b21f1b7a1c7b
Time: 2015-11-29
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 17c4f4d3914a90ec9270bb5688052ecfa6ac8b85
Time: 2017-02-01
Author: turbokongen@hotmail.com
File Name: homeassistant/components/lock/zwave.py
Class Name: ZwaveLock
Method Name: update_properties


Project Name: home-assistant/home-assistant
Commit Name: d91fe792c56d872e9054fd608978fd51a99142dd
Time: 2015-11-27
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 68d6bcd3edd0eaf20b081fbf154de2942b85ac45
Time: 2017-02-01
Author: turbokongen@hotmail.com
File Name: homeassistant/components/lock/zwave.py
Class Name: ZwaveLock
Method Name: update_properties