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:
Dylan Owen 2023-06-27 08:31:02 -04:00 committed by GitHub
parent 9ca0a095ab
commit fe28067481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
tracker_interfaces = conf[CONF_TRACKER_INTERFACE]
interfaces_client = diagnostics.InterfaceClient(
api_key, api_secret, url, verify_ssl
api_key, api_secret, url, verify_ssl, timeout=20
)
try:
interfaces_client.get_arp()
@ -60,7 +60,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
if tracker_interfaces:
# Verify that specified tracker interfaces are valid
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())
for interface in tracker_interfaces:

View File

@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/opnsense",
"iot_class": "local_polling",
"loggers": ["pbr", "pyopnsense"],
"requirements": ["pyopnsense==0.2.0"]
"requirements": ["pyopnsense==0.4.0"]
}

View File

@ -1880,7 +1880,7 @@ pyombi==0.1.10
pyopenuv==2023.02.0
# homeassistant.components.opnsense
pyopnsense==0.2.0
pyopnsense==0.4.0
# homeassistant.components.opple
pyoppleio-legacy==1.0.8

View File

@ -1393,7 +1393,7 @@ pyoctoprintapi==0.1.11
pyopenuv==2023.02.0
# homeassistant.components.opnsense
pyopnsense==0.2.0
pyopnsense==0.4.0
# homeassistant.components.opentherm_gw
pyotgw==2.1.3