mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 07:47:08 +00:00
Add missing disconnect in elkm1 config flow validation (#67716)
This commit is contained in:
parent
26c5dca45d
commit
23b218bc44
@ -81,8 +81,11 @@ async def validate_input(data: dict[str, str], mac: str | None) -> dict[str, str
|
|||||||
)
|
)
|
||||||
elk.connect()
|
elk.connect()
|
||||||
|
|
||||||
if not await async_wait_for_elk_to_sync(elk, LOGIN_TIMEOUT, VALIDATE_TIMEOUT):
|
try:
|
||||||
raise InvalidAuth
|
if not await async_wait_for_elk_to_sync(elk, LOGIN_TIMEOUT, VALIDATE_TIMEOUT):
|
||||||
|
raise InvalidAuth
|
||||||
|
finally:
|
||||||
|
elk.disconnect()
|
||||||
|
|
||||||
short_mac = _short_mac(mac) if mac else None
|
short_mac = _short_mac(mac) if mac else None
|
||||||
if prefix and prefix != short_mac:
|
if prefix and prefix != short_mac:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user