Add keep-alive which is required for some hlk-sw16 variants (#31062)

This commit is contained in:
James Hilliard 2020-01-22 18:57:55 -07:00 committed by Paulus Schoutsen
parent b7678f526c
commit d8eca8e303
3 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,7 @@ _LOGGER = logging.getLogger(__name__)
DATA_DEVICE_REGISTER = "hlk_sw16_device_register"
DEFAULT_RECONNECT_INTERVAL = 10
DEFAULT_KEEP_ALIVE_INTERVAL = 3
CONNECTION_TIMEOUT = 10
DEFAULT_PORT = 8080
@ -93,6 +94,7 @@ async def async_setup(hass, config):
loop=hass.loop,
timeout=CONNECTION_TIMEOUT,
reconnect_interval=DEFAULT_RECONNECT_INTERVAL,
keep_alive_interval=DEFAULT_KEEP_ALIVE_INTERVAL,
)
hass.data[DATA_DEVICE_REGISTER][device] = client

View File

@ -2,7 +2,7 @@
"domain": "hlk_sw16",
"name": "Hi-Link HLK-SW16",
"documentation": "https://www.home-assistant.io/integrations/hlk_sw16",
"requirements": ["hlk-sw16==0.0.7"],
"requirements": ["hlk-sw16==0.0.8"],
"dependencies": [],
"codeowners": []
}

View File

@ -667,7 +667,7 @@ hikvision==0.4
hkavr==0.0.5
# homeassistant.components.hlk_sw16
hlk-sw16==0.0.7
hlk-sw16==0.0.8
# homeassistant.components.pi_hole
hole==0.5.0