mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Fix failure to register services in dynalite (#93069)
* fixed bug that fails to register services when there is no YAML config * style improvement per thecode's suggestion
This commit is contained in:
parent
c522ea855d
commit
f564a0ca24
@ -43,19 +43,11 @@ CONFIG_SCHEMA = vol.Schema(
|
||||
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
"""Set up the Dynalite platform."""
|
||||
conf = config.get(DOMAIN)
|
||||
conf = config.get(DOMAIN, {})
|
||||
LOGGER.debug("Setting up dynalite component config = %s", conf)
|
||||
|
||||
if conf is None:
|
||||
conf = {}
|
||||
|
||||
hass.data[DOMAIN] = {}
|
||||
|
||||
# User has configured bridges
|
||||
if CONF_BRIDGES not in conf:
|
||||
return True
|
||||
|
||||
bridges = conf[CONF_BRIDGES]
|
||||
bridges = conf.get(CONF_BRIDGES, [])
|
||||
|
||||
for bridge_conf in bridges:
|
||||
host = bridge_conf[CONF_HOST]
|
||||
|
Loading…
x
Reference in New Issue
Block a user