db23320659a711637b5164fbe6ae6db15cc48e48,homeassistant/components/sensor/apcupsd.py,,setup_platform,#Any#Any#Any#Any#,22

Before Change



def setup_platform(hass, config, add_entities, discovery_info=None):
    Setup the APCUPSd sensor.
    typ = config.get(apcupsd.CONF_TYPE)
    if typ is None:
        _LOGGER.error(
            "You must include a "%s" when configuring an APCUPSd sensor.",
            apcupsd.CONF_TYPE)

After Change


    entities = []

    for resource in config["resources"]:
        sensor_type = resource.lower()

        if sensor_type not in SENSOR_TYPES:
            SENSOR_TYPES[sensor_type] = [
                sensor_type.title(), "", "mdi:information-outline"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


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


Project Name: commonsense/conceptnet5
Commit Name: 9582b206c63f01ca3f6990f50b0cd7754e2fe65b
Time: 2013-05-24
Author: rob@luminoso.com
File Name: conceptnet5/nodes.py
Class Name:
Method Name: make_concept_uri


Project Name: comic/grand-challenge.org
Commit Name: 87410f44a11fcd8366cb0ec74c82b74cef5d428a
Time: 2018-11-29
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/subdomains/urls.py
Class Name:
Method Name: reverse


Project Name: deepfakes/faceswap
Commit Name: 1bdc9da02f805f45c81485078a91d5410a64cfc6
Time: 2019-12-29
Author: 36920800+torzdf@users.noreply.github.com
File Name: plugins/convert/mask/_base.py
Class Name: Adjustment
Method Name: __init__