Change life360 timeouts & retries (#81799)
Change from single timeout of 10 to socket timeout of 15, total timeout of 60, and retry up to 3 times. Bump life360 package to 5.3.0.
This commit is contained in:
parent
5a6f7e66cb
commit
8874bf7791
5 changed files with 9 additions and 4 deletions
|
@ -3,11 +3,14 @@
|
|||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from aiohttp import ClientTimeout
|
||||
|
||||
DOMAIN = "life360"
|
||||
LOGGER = logging.getLogger(__package__)
|
||||
|
||||
ATTRIBUTION = "Data provided by life360.com"
|
||||
COMM_TIMEOUT = 10
|
||||
COMM_MAX_RETRIES = 3
|
||||
COMM_TIMEOUT = ClientTimeout(sock_connect=15, total=60)
|
||||
SPEED_FACTOR_MPH = 2.25
|
||||
SPEED_DIGITS = 1
|
||||
UPDATE_INTERVAL = timedelta(seconds=10)
|
||||
|
|
|
@ -26,6 +26,7 @@ from homeassistant.util.unit_conversion import DistanceConverter
|
|||
from homeassistant.util.unit_system import METRIC_SYSTEM
|
||||
|
||||
from .const import (
|
||||
COMM_MAX_RETRIES,
|
||||
COMM_TIMEOUT,
|
||||
CONF_AUTHORIZATION,
|
||||
DOMAIN,
|
||||
|
@ -106,6 +107,7 @@ class Life360DataUpdateCoordinator(DataUpdateCoordinator[Life360Data]):
|
|||
self._api = Life360(
|
||||
session=async_get_clientsession(hass),
|
||||
timeout=COMM_TIMEOUT,
|
||||
max_retries=COMM_MAX_RETRIES,
|
||||
authorization=entry.data[CONF_AUTHORIZATION],
|
||||
)
|
||||
self._missing_loc_reason = hass.data[DOMAIN].missing_loc_reason
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/life360",
|
||||
"codeowners": ["@pnbruckner"],
|
||||
"requirements": ["life360==5.1.1"],
|
||||
"requirements": ["life360==5.3.0"],
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["life360"]
|
||||
}
|
||||
|
|
|
@ -1019,7 +1019,7 @@ librouteros==3.2.0
|
|||
libsoundtouch==0.8
|
||||
|
||||
# homeassistant.components.life360
|
||||
life360==5.1.1
|
||||
life360==5.3.0
|
||||
|
||||
# homeassistant.components.osramlightify
|
||||
lightify==1.0.7.3
|
||||
|
|
|
@ -757,7 +757,7 @@ librouteros==3.2.0
|
|||
libsoundtouch==0.8
|
||||
|
||||
# homeassistant.components.life360
|
||||
life360==5.1.1
|
||||
life360==5.3.0
|
||||
|
||||
# homeassistant.components.logi_circle
|
||||
logi_circle==0.2.3
|
||||
|
|
Loading…
Add table
Reference in a new issue