Add inline comments to elkm1 about how config is updated from… (#33361)

pull/33367/head
J. Nick Koston 2020-03-28 11:23:39 -05:00 committed by GitHub
parent 1477087c71
commit 5a1b0edd96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -149,6 +149,11 @@ async def async_setup(hass: HomeAssistant, hass_config: ConfigType) -> bool:
for index, conf in enumerate(hass_config[DOMAIN]):
_LOGGER.debug("Importing elkm1 #%d - %s", index, conf[CONF_HOST])
# The update of the config entry is done in async_setup
# to ensure the entry if updated before async_setup_entry
# is called to avoid a situation where the user has to restart
# twice for the changes to take effect
current_config_entry = _async_find_matching_config_entry(
hass, conf[CONF_PREFIX]
)

View File

@ -176,7 +176,7 @@ async def test_form_cannot_connect(hass):
async def test_form_invalid_auth(hass):
"""Test we handle cannot connect error."""
"""Test we handle invalid auth error."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)