Merge pull request #24839 from home-assistant/rc

0.95.4
This commit is contained in:
Paulus Schoutsen 2019-06-28 22:42:23 -07:00 committed by GitHub
commit 9cf43dd8ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 14 deletions

View File

@ -52,7 +52,7 @@ class AlexaConfig(AbstractConfig):
@property @property
def entity_config(self): def entity_config(self):
"""Return entity config.""" """Return entity config."""
return self._config.get(CONF_ENTITY_CONFIG, {}) return self._config.get(CONF_ENTITY_CONFIG) or {}
def should_expose(self, entity_id): def should_expose(self, entity_id):
"""If an entity should be exposed.""" """If an entity should be exposed."""

View File

@ -24,7 +24,7 @@ class CloudGoogleConfig(AbstractConfig):
@property @property
def entity_config(self): def entity_config(self):
"""Return entity config.""" """Return entity config."""
return self._config.get(CONF_ENTITY_CONFIG) return self._config.get(CONF_ENTITY_CONFIG) or {}
@property @property
def secure_devices_pin(self): def secure_devices_pin(self):

View File

@ -122,17 +122,12 @@ def setup(hass, config):
def device_discovered(_, info): def device_discovered(_, info):
_LOGGER.debug("Adding autodetected %s", info['hostname']) _LOGGER.debug("Adding autodetected %s", info['hostname'])
device_type = info['device_type'] name = "yeelight_%s_%s" % (info['device_type'],
name = "yeelight_%s_%s" % (device_type,
info['properties']['mac']) 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) discovery.listen(hass, SERVICE_YEELIGHT, device_discovered)

View File

@ -178,8 +178,10 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
_lights_setup_helper(YeelightWithAmbientLight) _lights_setup_helper(YeelightWithAmbientLight)
_lights_setup_helper(YeelightAmbientLight) _lights_setup_helper(YeelightAmbientLight)
else: else:
_LOGGER.error("Cannot determine device type for %s, %s", _lights_setup_helper(YeelightGenericLight)
device.ipaddr, device.name) _LOGGER.warning("Cannot determine device type for %s, %s. "
"Falling back to white only", device.ipaddr,
device.name)
hass.data[data_key] += lights hass.data[data_key] += lights
add_entities(lights, True) add_entities(lights, True)

View File

@ -2,7 +2,7 @@
"""Constants used by Home Assistant components.""" """Constants used by Home Assistant components."""
MAJOR_VERSION = 0 MAJOR_VERSION = 0
MINOR_VERSION = 95 MINOR_VERSION = 95
PATCH_VERSION = '3' PATCH_VERSION = '4'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
REQUIRED_PYTHON_VER = (3, 5, 3) REQUIRED_PYTHON_VER = (3, 5, 3)