

def setup_platform(hass, config, add_devices_callback, discovery_info=None):
    'Setup the LimitlessLED lights.'
    from limitlessled.bridge import Bridge
    config = rewrite_legacy(config)
    lights = []
    for bridge_conf in config.get('bridges'):
        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)

dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/light/limitlessled.py setup_platform/original