174aeacd768bdbf85e6f9454f358e766a49d8f83,homeassistant/components/light/rfxtrx.py,,setup_platform,#Any#Any#Any#Any#,37

Before Change


            new_light = RfxtrxLight(entity_name, False)
            rfxtrx.RFX_DEVICES[entity_id] = new_light

    add_devices_callback(rfxtrx.RFX_DEVICES.values())

    def light_update(event):
         Callback for sensor updates from the RFXtrx gateway. 
        if isinstance(event.device, LightingDevice):

After Change


    logger = logging.getLogger(__name__)

    // Add light from config file
    lights = []
    devices = config.get("devices")
    for entity_id, entity_name in devices.items():
        if entity_id not in rfxtrx.RFX_DEVICES:
            logger.info("Add %s rfxtrx.light" % entity_name)
            new_light = RfxtrxLight(entity_name, False)
            rfxtrx.RFX_DEVICES[entity_id] = new_light
            lights.append(new_light)

    add_devices_callback(lights)

    def light_update(event):
         Callback for sensor updates from the RFXtrx gateway. 
        if isinstance(event.device, LightingDevice):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: home-assistant/home-assistant
Commit Name: 174aeacd768bdbf85e6f9454f358e766a49d8f83
Time: 2015-09-27
Author: bruno.adele@jesuislibre.org
File Name: homeassistant/components/light/rfxtrx.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 174aeacd768bdbf85e6f9454f358e766a49d8f83
Time: 2015-09-27
Author: bruno.adele@jesuislibre.org
File Name: homeassistant/components/switch/rfxtrx.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 18ca7b4f9e3d3186384a5b95a1ba0be7ea1d87a9
Time: 2015-11-29
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/switch/orvibo.py
Class Name:
Method Name: setup_platform