mirror of https://github.com/home-assistant/core
Add keep-alive which is required for some hlk-sw16 variants (#31062)
This commit is contained in:
parent
b7678f526c
commit
d8eca8e303
|
@ -24,6 +24,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
DATA_DEVICE_REGISTER = "hlk_sw16_device_register"
|
DATA_DEVICE_REGISTER = "hlk_sw16_device_register"
|
||||||
DEFAULT_RECONNECT_INTERVAL = 10
|
DEFAULT_RECONNECT_INTERVAL = 10
|
||||||
|
DEFAULT_KEEP_ALIVE_INTERVAL = 3
|
||||||
CONNECTION_TIMEOUT = 10
|
CONNECTION_TIMEOUT = 10
|
||||||
DEFAULT_PORT = 8080
|
DEFAULT_PORT = 8080
|
||||||
|
|
||||||
|
@ -93,6 +94,7 @@ async def async_setup(hass, config):
|
||||||
loop=hass.loop,
|
loop=hass.loop,
|
||||||
timeout=CONNECTION_TIMEOUT,
|
timeout=CONNECTION_TIMEOUT,
|
||||||
reconnect_interval=DEFAULT_RECONNECT_INTERVAL,
|
reconnect_interval=DEFAULT_RECONNECT_INTERVAL,
|
||||||
|
keep_alive_interval=DEFAULT_KEEP_ALIVE_INTERVAL,
|
||||||
)
|
)
|
||||||
|
|
||||||
hass.data[DATA_DEVICE_REGISTER][device] = client
|
hass.data[DATA_DEVICE_REGISTER][device] = client
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"domain": "hlk_sw16",
|
"domain": "hlk_sw16",
|
||||||
"name": "Hi-Link HLK-SW16",
|
"name": "Hi-Link HLK-SW16",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/hlk_sw16",
|
"documentation": "https://www.home-assistant.io/integrations/hlk_sw16",
|
||||||
"requirements": ["hlk-sw16==0.0.7"],
|
"requirements": ["hlk-sw16==0.0.8"],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
|
|
@ -667,7 +667,7 @@ hikvision==0.4
|
||||||
hkavr==0.0.5
|
hkavr==0.0.5
|
||||||
|
|
||||||
# homeassistant.components.hlk_sw16
|
# homeassistant.components.hlk_sw16
|
||||||
hlk-sw16==0.0.7
|
hlk-sw16==0.0.8
|
||||||
|
|
||||||
# homeassistant.components.pi_hole
|
# homeassistant.components.pi_hole
|
||||||
hole==0.5.0
|
hole==0.5.0
|
||||||
|
|
Loading…
Reference in New Issue