d91fe792c56d872e9054fd608978fd51a99142dd,homeassistant/components/light/limitlessled.py,,setup_platform,#Any#Any#Any#Any#,51
Before Change
lights = []
for bridge in bridges:
for i in range(1, 5):
name_key = "group_%d_name" % i
if name_key in bridge:
group_type = bridge.get("group_%d_type" % i, "rgbw")
lights.append(LimitlessLED.factory(pool, bridge["id"], i,
bridge[name_key],
group_type))
add_devices_callback(lights)
class LimitlessLED(Light):
After Change
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):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
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: 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: dpressel/mead-baseline
Commit Name: da1e8c2de9b265dcb18256a0a087165faf138b42
Time: 2019-01-14
Author: blester125@users.noreply.github.com
File Name: python/baseline/services.py
Class Name: EncoderDecoderService
Method Name: predict