1ca09ea36f80458cd9819d85b9aae29c1ed343a4,homeassistant/components/sensor/zoneminder.py,,setup_platform,#Any#Any#Any#Any#,42

Before Change



    sensors = []

    monitors = zoneminder.get_state("api/monitors.json")
    for i in monitors["monitors"]:
        sensors.append(
            ZMSensorMonitors(int(i["Monitor"]["Id"]), i["Monitor"]["Name"])
        )

        for sensor in config[CONF_MONITORED_CONDITIONS]:

After Change


    Set up the ZoneMinder sensor platform.
    include_archived = config.get(CONF_INCLUDE_ARCHIVED)

    zm_client = hass.data[ZONEMINDER_DOMAIN]
    monitors = zm_client.get_monitors()
    if not monitors:
        _LOGGER.warning("Could not fetch any monitors from ZoneMinder")

    sensors = []
    for monitor in monitors:
        sensors.append(ZMSensorMonitors(monitor))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: home-assistant/home-assistant
Commit Name: 1ca09ea36f80458cd9819d85b9aae29c1ed343a4
Time: 2018-09-14
Author: rohan@rohankapoor.com
File Name: homeassistant/components/sensor/zoneminder.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 1ca09ea36f80458cd9819d85b9aae29c1ed343a4
Time: 2018-09-14
Author: rohan@rohankapoor.com
File Name: homeassistant/components/switch/zoneminder.py
Class Name:
Method Name: setup_platform


Project Name: ray-project/ray
Commit Name: 86cff17e7ef1b355e1ab4862ccd664ed4c856227
Time: 2020-03-30
Author: rliaw@berkeley.edu
File Name: python/ray/util/sgd/torch/torch_trainer.py
Class Name: TorchTrainer
Method Name: get_model