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

Before Change


    password = config.get(CONF_PASSWORD)

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


class TotalConnect(alarm.AlarmControlPanel):

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: 4

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: 0eee544d1709ce3029f17fc2d21a8cd2378438f7
Time: 2017-08-28
Author: jordy@fusion-ict.nl
File Name: homeassistant/components/rainbird.py
Class Name:
Method Name: setup


Project Name: home-assistant/home-assistant
Commit Name: c25cbccca973e812cc5d4b33f5513c4f635d7421
Time: 2019-03-03
Author: shanbs@gmail.com
File Name: homeassistant/components/netatmo/climate.py
Class Name:
Method Name: setup_platform