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,
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]
sensors += [NestWeatherSensor(structure, device,
WEATHER_VARS[variable])
for variable in config[CONF_MONITORED_CONDITIONS]
if variable in WEATHER_VARS]
add_devices(sensors)
class NestSensor(Entity):
Representation of a Nest sensor.