mirror of
https://github.com/home-assistant/core
synced 2024-09-28 03:04:04 +02:00
Updated pyopnsense to support a 20 second timeout (#95314)
* Updated pyopnsense to support a timeout * Self Review * Removed the yaml configuration portion
This commit is contained in:
parent
9ca0a095ab
commit
fe28067481
@ -49,7 +49,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
tracker_interfaces = conf[CONF_TRACKER_INTERFACE]
|
tracker_interfaces = conf[CONF_TRACKER_INTERFACE]
|
||||||
|
|
||||||
interfaces_client = diagnostics.InterfaceClient(
|
interfaces_client = diagnostics.InterfaceClient(
|
||||||
api_key, api_secret, url, verify_ssl
|
api_key, api_secret, url, verify_ssl, timeout=20
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
interfaces_client.get_arp()
|
interfaces_client.get_arp()
|
||||||
@ -60,7 +60,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||||||
if tracker_interfaces:
|
if tracker_interfaces:
|
||||||
# Verify that specified tracker interfaces are valid
|
# Verify that specified tracker interfaces are valid
|
||||||
netinsight_client = diagnostics.NetworkInsightClient(
|
netinsight_client = diagnostics.NetworkInsightClient(
|
||||||
api_key, api_secret, url, verify_ssl
|
api_key, api_secret, url, verify_ssl, timeout=20
|
||||||
)
|
)
|
||||||
interfaces = list(netinsight_client.get_interfaces().values())
|
interfaces = list(netinsight_client.get_interfaces().values())
|
||||||
for interface in tracker_interfaces:
|
for interface in tracker_interfaces:
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/opnsense",
|
"documentation": "https://www.home-assistant.io/integrations/opnsense",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["pbr", "pyopnsense"],
|
"loggers": ["pbr", "pyopnsense"],
|
||||||
"requirements": ["pyopnsense==0.2.0"]
|
"requirements": ["pyopnsense==0.4.0"]
|
||||||
}
|
}
|
||||||
|
@ -1880,7 +1880,7 @@ pyombi==0.1.10
|
|||||||
pyopenuv==2023.02.0
|
pyopenuv==2023.02.0
|
||||||
|
|
||||||
# homeassistant.components.opnsense
|
# homeassistant.components.opnsense
|
||||||
pyopnsense==0.2.0
|
pyopnsense==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.opple
|
# homeassistant.components.opple
|
||||||
pyoppleio-legacy==1.0.8
|
pyoppleio-legacy==1.0.8
|
||||||
|
@ -1393,7 +1393,7 @@ pyoctoprintapi==0.1.11
|
|||||||
pyopenuv==2023.02.0
|
pyopenuv==2023.02.0
|
||||||
|
|
||||||
# homeassistant.components.opnsense
|
# homeassistant.components.opnsense
|
||||||
pyopnsense==0.2.0
|
pyopnsense==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.opentherm_gw
|
# homeassistant.components.opentherm_gw
|
||||||
pyotgw==2.1.3
|
pyotgw==2.1.3
|
||||||
|
Loading…
Reference in New Issue
Block a user