d7e3c6a442fa43ca0597200618ea77577299cf5e,homeassistant/components/alarm_control_panel/verisure.py,,setup_platform,#Any#Any#Any#Any#,20

Before Change


def setup_platform(hass, config, add_devices, discovery_info=None):
     Sets up the Verisure platform. 

    if not verisure.MY_PAGES:
        _LOGGER.error("A connection has not been made to Verisure mypages.")
        return False

    alarms = []

    alarms.extend([
        VerisureAlarm(value)
        for value in verisure.ALARM_STATUS.values()
        if verisure.SHOW_ALARM
        ])

    add_devices(alarms)

After Change


     Sets up the Verisure platform. 

    alarms = []
    if int(hub.config.get("alarm", "1")):
        hub.update_alarms()
        alarms.extend([
            VerisureAlarm(value.id)
            for value in hub.alarm_status.values()
            ])
    add_devices(alarms)


// pylint: disable=abstract-method
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: home-assistant/home-assistant
Commit Name: d7e3c6a442fa43ca0597200618ea77577299cf5e
Time: 2016-02-27
Author: per.j.sandstrom@gmail.com
File Name: homeassistant/components/alarm_control_panel/verisure.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: d7e3c6a442fa43ca0597200618ea77577299cf5e
Time: 2016-02-27
Author: per.j.sandstrom@gmail.com
File Name: homeassistant/components/sensor/verisure.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: d7e3c6a442fa43ca0597200618ea77577299cf5e
Time: 2016-02-27
Author: per.j.sandstrom@gmail.com
File Name: homeassistant/components/lock/verisure.py
Class Name:
Method Name: setup_platform