Move handling of non-secure login to the elkm1 library (#69483)

pull/69531/head
J. Nick Koston 2022-04-06 19:32:31 -10:00 committed by GitHub
parent f11f1db177
commit 5bcb795bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 13 deletions

View File

@ -351,21 +351,11 @@ async def async_wait_for_elk_to_sync(
login_event.set()
sync_event.set()
def first_response(*args, **kwargs):
_LOGGER.debug("ElkM1 received first response (VN)")
login_event.set()
def sync_complete():
sync_event.set()
success = True
elk.add_handler("login", login_status)
# VN is the first command sent for panel, when we get
# it back we now we are logged in either with or without a password
elk.add_handler("VN", first_response)
# Some panels do not respond to the vn request so we
# check for lw as well
elk.add_handler("LW", first_response)
elk.add_handler("sync_complete", sync_complete)
for name, event, timeout in (
("login", login_event, login_timeout),

View File

@ -2,7 +2,7 @@
"domain": "elkm1",
"name": "Elk-M1 Control",
"documentation": "https://www.home-assistant.io/integrations/elkm1",
"requirements": ["elkm1-lib==1.2.0"],
"requirements": ["elkm1-lib==1.2.2"],
"dhcp": [{ "registered_devices": true }, { "macaddress": "00409D*" }],
"codeowners": ["@gwww", "@bdraco"],
"dependencies": ["network"],

View File

@ -578,7 +578,7 @@ elgato==3.0.0
eliqonline==1.2.2
# homeassistant.components.elkm1
elkm1-lib==1.2.0
elkm1-lib==1.2.2
# homeassistant.components.elmax
elmax_api==0.0.2

View File

@ -409,7 +409,7 @@ dynalite_devices==0.1.46
elgato==3.0.0
# homeassistant.components.elkm1
elkm1-lib==1.2.0
elkm1-lib==1.2.2
# homeassistant.components.elmax
elmax_api==0.0.2