789929d4457fd9bff7710d46171000a4b6c4e3aa,homeassistant/components/sensor/hddtemp.py,,setup_platform,#Any#Any#Any#Any#,39

Before Change


        _LOGGER.error("Unable to fetch the data from %s:%s", host, port)
        return False

    add_devices([HddTempSensor(name, hddtemp)], True)


class HddTempSensor(Entity):
    Representation of a HDDTemp sensor.

After Change


        return False

    if not disks:
        disks = [next(iter(hddtemp.data)).split("|")[0]]

    dev = []
    for disk in disks:
        if disk in hddtemp.data:
            dev.append(HddTempSensor(name, disk, hddtemp))
        else:
            continue

    add_devices(dev, True)


class HddTempSensor(Entity):
    Representation of a HDDTemp sensor.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: home-assistant/home-assistant
Commit Name: 789929d4457fd9bff7710d46171000a4b6c4e3aa
Time: 2017-10-21
Author: cgtobi@users.noreply.github.com
File Name: homeassistant/components/sensor/hddtemp.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 789929d4457fd9bff7710d46171000a4b6c4e3aa
Time: 2017-10-21
Author: cgtobi@users.noreply.github.com
File Name: homeassistant/components/sensor/hddtemp.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 920d298c7e117cb9b83e3489df5d40860b5d334b
Time: 2017-04-20
Author: mountainsandcode@icloud.com
File Name: homeassistant/components/sensor/mvglive.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 7ee75d67c50f02c8947e673bc0fa1d41880d3522
Time: 2017-02-27
Author: andrey-git@users.noreply.github.com
File Name: homeassistant/components/sensor/mhz19.py
Class Name:
Method Name: setup_platform