mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add inline comments to elkm1 about how config is updated from… (#33361)
This commit is contained in:
parent
1477087c71
commit
5a1b0edd96
@ -149,6 +149,11 @@ async def async_setup(hass: HomeAssistant, hass_config: ConfigType) -> bool:
|
|||||||
|
|
||||||
for index, conf in enumerate(hass_config[DOMAIN]):
|
for index, conf in enumerate(hass_config[DOMAIN]):
|
||||||
_LOGGER.debug("Importing elkm1 #%d - %s", index, conf[CONF_HOST])
|
_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(
|
current_config_entry = _async_find_matching_config_entry(
|
||||||
hass, conf[CONF_PREFIX]
|
hass, conf[CONF_PREFIX]
|
||||||
)
|
)
|
||||||
|
@ -176,7 +176,7 @@ async def test_form_cannot_connect(hass):
|
|||||||
|
|
||||||
|
|
||||||
async def test_form_invalid_auth(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(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user