Make sure all nest platforms require discovery info (#4734)
This commit is contained in:
parent
87dab37b8a
commit
64b1179c13
4 changed files with 9 additions and 1 deletions
|
@ -60,6 +60,9 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setup Nest binary sensors."""
|
"""Setup Nest binary sensors."""
|
||||||
|
if discovery_info is None:
|
||||||
|
return
|
||||||
|
|
||||||
nest = hass.data[DATA_NEST]
|
nest = hass.data[DATA_NEST]
|
||||||
conf = config.get(CONF_MONITORED_CONDITIONS, _VALID_BINARY_SENSOR_TYPES)
|
conf = config.get(CONF_MONITORED_CONDITIONS, _VALID_BINARY_SENSOR_TYPES)
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Set up a Nest Cam."""
|
"""Set up a Nest Cam."""
|
||||||
if discovery_info is None:
|
if discovery_info is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
camera_devices = hass.data[nest.DATA_NEST].camera_devices()
|
camera_devices = hass.data[nest.DATA_NEST].camera_devices()
|
||||||
cameras = [NestCamera(structure, device)
|
cameras = [NestCamera(structure, device)
|
||||||
for structure, device in camera_devices]
|
for structure, device in camera_devices]
|
||||||
|
|
|
@ -31,10 +31,11 @@ STATE_HEAT_COOL = 'heat-cool'
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setup the Nest thermostat."""
|
"""Setup the Nest thermostat."""
|
||||||
_LOGGER.debug("Setting up nest thermostat")
|
|
||||||
if discovery_info is None:
|
if discovery_info is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
_LOGGER.debug("Setting up nest thermostat")
|
||||||
|
|
||||||
temp_unit = hass.config.units.temperature_unit
|
temp_unit = hass.config.units.temperature_unit
|
||||||
|
|
||||||
add_devices(
|
add_devices(
|
||||||
|
|
|
@ -68,6 +68,9 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
"""Setup the Nest Sensor."""
|
"""Setup the Nest Sensor."""
|
||||||
|
if discovery_info is None:
|
||||||
|
return
|
||||||
|
|
||||||
nest = hass.data[DATA_NEST]
|
nest = hass.data[DATA_NEST]
|
||||||
conf = config.get(CONF_MONITORED_CONDITIONS, _VALID_SENSOR_TYPES)
|
conf = config.get(CONF_MONITORED_CONDITIONS, _VALID_SENSOR_TYPES)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue