Envisalink startup reconnect (#27063)
* Added retry capability to the component initialization. * Removed extra chars * Black formatting. * Removed issue with block upon setup. Now setup will only fail if auth failed to the device.
This commit is contained in:
parent
adab228012
commit
f2c5c249d2
3 changed files with 7 additions and 4 deletions
|
@ -141,9 +141,12 @@ async def async_setup(hass, config):
|
|||
@callback
|
||||
def connection_fail_callback(data):
|
||||
"""Network failure callback."""
|
||||
_LOGGER.error("Could not establish a connection with the Envisalink")
|
||||
_LOGGER.error(
|
||||
"Could not establish a connection with the Envisalink- retrying..."
|
||||
)
|
||||
if not sync_connect.done():
|
||||
sync_connect.set_result(False)
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_envisalink)
|
||||
sync_connect.set_result(True)
|
||||
|
||||
@callback
|
||||
def connection_success_callback(data):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Envisalink",
|
||||
"documentation": "https://www.home-assistant.io/integrations/envisalink",
|
||||
"requirements": [
|
||||
"pyenvisalink==3.8"
|
||||
"pyenvisalink==4.0"
|
||||
],
|
||||
"dependencies": [],
|
||||
"codeowners": []
|
||||
|
|
|
@ -1168,7 +1168,7 @@ pyeight==0.1.1
|
|||
pyemby==1.6
|
||||
|
||||
# homeassistant.components.envisalink
|
||||
pyenvisalink==3.8
|
||||
pyenvisalink==4.0
|
||||
|
||||
# homeassistant.components.ephember
|
||||
pyephember==0.2.0
|
||||
|
|
Loading…
Add table
Reference in a new issue