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:
Dan Cinnamon 2019-10-03 19:15:52 -05:00 committed by Paulus Schoutsen
parent adab228012
commit f2c5c249d2
3 changed files with 7 additions and 4 deletions

View File

@ -141,9 +141,12 @@ async def async_setup(hass, config):
@callback @callback
def connection_fail_callback(data): def connection_fail_callback(data):
"""Network failure callback.""" """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(): 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 @callback
def connection_success_callback(data): def connection_success_callback(data):

View File

@ -3,7 +3,7 @@
"name": "Envisalink", "name": "Envisalink",
"documentation": "https://www.home-assistant.io/integrations/envisalink", "documentation": "https://www.home-assistant.io/integrations/envisalink",
"requirements": [ "requirements": [
"pyenvisalink==3.8" "pyenvisalink==4.0"
], ],
"dependencies": [], "dependencies": [],
"codeowners": [] "codeowners": []

View File

@ -1168,7 +1168,7 @@ pyeight==0.1.1
pyemby==1.6 pyemby==1.6
# homeassistant.components.envisalink # homeassistant.components.envisalink
pyenvisalink==3.8 pyenvisalink==4.0
# homeassistant.components.ephember # homeassistant.components.ephember
pyephember==0.2.0 pyephember==0.2.0