diff --git a/homeassistant/components/alexa/smart_home_http.py b/homeassistant/components/alexa/smart_home_http.py index e9437a411d6..4636ee10bb7 100644 --- a/homeassistant/components/alexa/smart_home_http.py +++ b/homeassistant/components/alexa/smart_home_http.py @@ -52,7 +52,7 @@ class AlexaConfig(AbstractConfig): @property def entity_config(self): """Return entity config.""" - return self._config.get(CONF_ENTITY_CONFIG, {}) + return self._config.get(CONF_ENTITY_CONFIG) or {} def should_expose(self, entity_id): """If an entity should be exposed.""" diff --git a/homeassistant/components/cloud/google_config.py b/homeassistant/components/cloud/google_config.py index b047d25ee49..5e95417cd33 100644 --- a/homeassistant/components/cloud/google_config.py +++ b/homeassistant/components/cloud/google_config.py @@ -24,7 +24,7 @@ class CloudGoogleConfig(AbstractConfig): @property def entity_config(self): """Return entity config.""" - return self._config.get(CONF_ENTITY_CONFIG) + return self._config.get(CONF_ENTITY_CONFIG) or {} @property def secure_devices_pin(self): diff --git a/homeassistant/components/yeelight/__init__.py b/homeassistant/components/yeelight/__init__.py index 39dc62eddb0..6978acdce8c 100644 --- a/homeassistant/components/yeelight/__init__.py +++ b/homeassistant/components/yeelight/__init__.py @@ -122,17 +122,12 @@ def setup(hass, config): def device_discovered(_, info): _LOGGER.debug("Adding autodetected %s", info['hostname']) - device_type = info['device_type'] - - name = "yeelight_%s_%s" % (device_type, + name = "yeelight_%s_%s" % (info['device_type'], info['properties']['mac']) - ipaddr = info[CONF_HOST] - device_config = DEVICE_SCHEMA({ - CONF_NAME: name, - CONF_MODEL: device_type - }) - _setup_device(hass, config, ipaddr, device_config) + device_config = DEVICE_SCHEMA({CONF_NAME: name}) + + _setup_device(hass, config, info[CONF_HOST], device_config) discovery.listen(hass, SERVICE_YEELIGHT, device_discovered) diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index 1abb05e784f..88314773be0 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -178,8 +178,10 @@ def setup_platform(hass, config, add_entities, discovery_info=None): _lights_setup_helper(YeelightWithAmbientLight) _lights_setup_helper(YeelightAmbientLight) else: - _LOGGER.error("Cannot determine device type for %s, %s", - device.ipaddr, device.name) + _lights_setup_helper(YeelightGenericLight) + _LOGGER.warning("Cannot determine device type for %s, %s. " + "Falling back to white only", device.ipaddr, + device.name) hass.data[data_key] += lights add_entities(lights, True) diff --git a/homeassistant/const.py b/homeassistant/const.py index 4d932481a4c..79aa735bfe2 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 95 -PATCH_VERSION = '3' +PATCH_VERSION = '4' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3)