966ab20f262128fa7194cc0e286249a6328a8410,homeassistant/components/alarm_control_panel/egardia.py,,setup_platform,#Any#Any#Any#Any#,62

Before Change


        _LOGGER.error("Unable to authorize. Wrong password or username")
        return False

    add_devices([EgardiaAlarm(
        name, egardiasystem, hass, rs_enabled, rs_port, rs_codes)], True)


class EgardiaAlarm(alarm.AlarmControlPanel):

After Change


        // Set up the egardia server
        _LOGGER.info("Setting up EgardiaServer")
        try:
            if D_EGARDIASRV not in hass.data:
                server = egardiaserver.EgardiaServer("", rs_port)
                bound = server.bind()
                if not bound:
                    raise IOError("Binding error occurred while " +
                                  "starting EgardiaServer")
                hass.data[D_EGARDIASRV] = server
                server.start()
        except IOError:
            return
        hass.data[D_EGARDIASRV].register_callback(eg_dev.handle_status_event)

    def handle_stop_event(event):
        Callback function for HA stop event.
        hass.data[D_EGARDIASRV].stop()

    // listen to home assistant stop event
    hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, handle_stop_event)

    // add egardia alarm device
    add_devices([eg_dev], True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: 966ab20f262128fa7194cc0e286249a6328a8410
Time: 2017-12-28
Author: jeroen_ter_heerdt@hotmail.com
File Name: homeassistant/components/alarm_control_panel/egardia.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 966ab20f262128fa7194cc0e286249a6328a8410
Time: 2017-12-28
Author: jeroen_ter_heerdt@hotmail.com
File Name: homeassistant/components/alarm_control_panel/egardia.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 33c906c20aa8ad62f19c974001ffa906759577f2
Time: 2017-08-29
Author: 1091741+MisterWil@users.noreply.github.com
File Name: homeassistant/components/abode.py
Class Name:
Method Name: setup


Project Name: home-assistant/home-assistant
Commit Name: 6500cb791588e115a62712199c0cbed626af8f31
Time: 2018-02-13
Author: frederik.bolding@gmail.com
File Name: homeassistant/components/camera/rpi_camera.py
Class Name:
Method Name: setup_platform