789929d4457fd9bff7710d46171000a4b6c4e3aa,homeassistant/components/sensor/hddtemp.py,,setup_platform,#Any#Any#Any#Any#,39
Before Change
hddtemp = HddTempData(host, port)
hddtemp.update()
if hddtemp.data is None:
_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.
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: a42288d056c6c4418856534c0dbacf2489a0a6c8
Time: 2018-07-19
Author: william.joseph.scanlon@gmail.com
File Name: homeassistant/components/alarm_control_panel/simplisafe.py
Class Name:
Method Name: setup_platform
Project Name: home-assistant/home-assistant
Commit Name: 8703124c760df303d29571aa975a72cc4f868f09
Time: 2018-01-17
Author: pierre.staahl@gmail.com
File Name: homeassistant/components/media_player/yamaha.py
Class Name:
Method Name: setup_platform