369e6a3905a6610377797ec8cdc64e7a42f436aa,homeassistant/components/totalconnect/alarm_control_panel.py,,setup_platform,#Any#Any#Any#Any#,26

Before Change



def setup_platform(hass, config, add_entities, discovery_info=None):
    Set up a TotalConnect control panel.
    name = config.get(CONF_NAME)
    username = config.get(CONF_USERNAME)
    password = config.get(CONF_PASSWORD)

    total_connect = TotalConnect(name, username, password)
    add_entities([total_connect], True)


class TotalConnect(alarm.AlarmControlPanel):
    Represent an TotalConnect status.

After Change


    if discovery_info is None:
        return

    alarms = []

    client = hass.data[TOTALCONNECT_DOMAIN].client

    for location in client.locations:
        location_id = location.get("LocationID")
        name = location.get("LocationName")
        alarms.append(TotalConnectAlarm(name, location_id, client))
    add_entities(alarms)


class TotalConnectAlarm(alarm.AlarmControlPanel):
    Represent an TotalConnect status.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: home-assistant/home-assistant
Commit Name: 369e6a3905a6610377797ec8cdc64e7a42f436aa
Time: 2019-07-14
Author: austin@mroczek.org
File Name: homeassistant/components/totalconnect/alarm_control_panel.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 9944c60311046df03f2d0706ba2c3477e733d49b
Time: 2018-09-08
Author: mail@fabian-affolter.ch
File Name: homeassistant/components/sensor/lastfm.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 369e6a3905a6610377797ec8cdc64e7a42f436aa
Time: 2019-07-14
Author: austin@mroczek.org
File Name: homeassistant/components/totalconnect/alarm_control_panel.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: db23320659a711637b5164fbe6ae6db15cc48e48
Time: 2016-07-06
Author: dale3h@gmail.com
File Name: homeassistant/components/sensor/apcupsd.py
Class Name:
Method Name: setup_platform