def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the Nest Sensor.""" for structure, device in chain(nest.devices(), nest.protect_devices()): sensors = [ NestBasicSensor(structure, device, variable) for variable in config[CONF_MONITORED_CONDITIONS] if variable in SENSOR_TYPES and is_thermostat(device) ] sensors += [ NestTempSensor(structure, device, variable) for variable in config[CONF_MONITORED_CONDITIONS] if variable in SENSOR_TEMP_TYPES and is_thermostat(device) ] sensors += [ NestWeatherSensor(structure, device, WEATHER_VARS[variable]) for variable in config[CONF_MONITORED_CONDITIONS] if variable in WEATHER_VARS and is_thermostat(device) ] sensors += [ NestProtectSensor(structure, device, variable) for variable in config[CONF_MONITORED_CONDITIONS] if variable in PROTECT_VARS and is_protect(device) ] add_devices(sensors)
def setup_platform(hass, config, add_devices, discovery_info=None): """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)
def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the Nest Sensor.""" for structure, device in chain(nest.devices(), nest.protect_devices()): sensors = [NestBasicSensor(structure, device, variable) for variable in config[CONF_MONITORED_CONDITIONS] if variable in SENSOR_TYPES and is_thermostat(device)] sensors += [NestTempSensor(structure, device, variable) for variable in config[CONF_MONITORED_CONDITIONS] if variable in SENSOR_TEMP_TYPES and is_thermostat(device)] sensors += [NestWeatherSensor(structure, device, WEATHER_VARS[variable]) for variable in config[CONF_MONITORED_CONDITIONS] if variable in WEATHER_VARS and is_thermostat(device)] sensors += [NestProtectSensor(structure, device, variable) for variable in config[CONF_MONITORED_CONDITIONS] if variable in PROTECT_VARS and is_protect(device)] add_devices(sensors)
def setup_platform(hass, config, add_devices, discovery_info=None): """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)
def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the Nest thermostat.""" add_devices([NestThermostat(structure, device) for structure, device in nest.devices()])
def setup_platform(hass, config, add_devices, discovery_info=None): """Setup the Nest thermostat.""" temp_unit = hass.config.units.temperature_unit add_devices([NestThermostat(structure, device, temp_unit) for structure, device in nest.devices()])
def setup_platform(hass, config, add_devices, discovery_info=None): """Setup Nest binary sensors.""" for structure, device in nest.devices(): add_devices([NestBinarySensor(structure, device, variable) for variable in config[CONF_MONITORED_CONDITIONS]])