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
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):

View file

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

View file

@ -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