9d848731d903a8ee2296bbfc6746f4eb5143a446,homeassistant/components/sensor/nest.py,,setup_platform,#Any#Any#Any#Any#,38
Before Change
for structure in nest.NEST.structures:
for device in structure.devices:
for variable in config["monitored_conditions"]:
if variable in SENSOR_TYPES:
add_devices([NestBasicSensor(structure,
device,
variable)])
elif variable in SENSOR_TEMP_TYPES:
add_devices([NestTempSensor(structure,
device,
variable)])
elif variable in WEATHER_VARIABLES:
json_variable = JSON_VARIABLE_NAMES.get(variable, None)
add_devices([NestWeatherSensor(structure,
device,
json_variable)])
else:
logger.error("Nest sensor type: "%s" does not exist",
variable)
except socket.error:
logger.error(
"Connection error logging into the nest web service."
)
After Change
Setup the Nest Sensor.
for structure, device in nest.devices():
sensors = [NestBasicSensor(structure, device, variable)
for variable in config[CONF_MONITORED_CONDITIONS]
if variable in SENSOR_TYPES]
sensors += [NestTempSensor(structure, device, variable)
for variable in config[CONF_MONITORED_CONDITIONS]
if variable in SENSOR_TEMP_TYPES]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: home-assistant/home-assistant
Commit Name: 9d848731d903a8ee2296bbfc6746f4eb5143a446
Time: 2016-04-11
Author: jaharkes@cs.cmu.edu
File Name: homeassistant/components/sensor/nest.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
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