mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
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
@ -3,11 +3,14 @@
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from aiohttp import ClientTimeout
|
||||||
|
|
||||||
DOMAIN = "life360"
|
DOMAIN = "life360"
|
||||||
LOGGER = logging.getLogger(__package__)
|
LOGGER = logging.getLogger(__package__)
|
||||||
|
|
||||||
ATTRIBUTION = "Data provided by life360.com"
|
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_FACTOR_MPH = 2.25
|
||||||
SPEED_DIGITS = 1
|
SPEED_DIGITS = 1
|
||||||
UPDATE_INTERVAL = timedelta(seconds=10)
|
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 homeassistant.util.unit_system import METRIC_SYSTEM
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
|
COMM_MAX_RETRIES,
|
||||||
COMM_TIMEOUT,
|
COMM_TIMEOUT,
|
||||||
CONF_AUTHORIZATION,
|
CONF_AUTHORIZATION,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
@ -106,6 +107,7 @@ class Life360DataUpdateCoordinator(DataUpdateCoordinator[Life360Data]):
|
|||||||
self._api = Life360(
|
self._api = Life360(
|
||||||
session=async_get_clientsession(hass),
|
session=async_get_clientsession(hass),
|
||||||
timeout=COMM_TIMEOUT,
|
timeout=COMM_TIMEOUT,
|
||||||
|
max_retries=COMM_MAX_RETRIES,
|
||||||
authorization=entry.data[CONF_AUTHORIZATION],
|
authorization=entry.data[CONF_AUTHORIZATION],
|
||||||
)
|
)
|
||||||
self._missing_loc_reason = hass.data[DOMAIN].missing_loc_reason
|
self._missing_loc_reason = hass.data[DOMAIN].missing_loc_reason
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/life360",
|
"documentation": "https://www.home-assistant.io/integrations/life360",
|
||||||
"codeowners": ["@pnbruckner"],
|
"codeowners": ["@pnbruckner"],
|
||||||
"requirements": ["life360==5.1.1"],
|
"requirements": ["life360==5.3.0"],
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["life360"]
|
"loggers": ["life360"]
|
||||||
}
|
}
|
||||||
|
@ -1019,7 +1019,7 @@ librouteros==3.2.0
|
|||||||
libsoundtouch==0.8
|
libsoundtouch==0.8
|
||||||
|
|
||||||
# homeassistant.components.life360
|
# homeassistant.components.life360
|
||||||
life360==5.1.1
|
life360==5.3.0
|
||||||
|
|
||||||
# homeassistant.components.osramlightify
|
# homeassistant.components.osramlightify
|
||||||
lightify==1.0.7.3
|
lightify==1.0.7.3
|
||||||
|
@ -757,7 +757,7 @@ librouteros==3.2.0
|
|||||||
libsoundtouch==0.8
|
libsoundtouch==0.8
|
||||||
|
|
||||||
# homeassistant.components.life360
|
# homeassistant.components.life360
|
||||||
life360==5.1.1
|
life360==5.3.0
|
||||||
|
|
||||||
# homeassistant.components.logi_circle
|
# homeassistant.components.logi_circle
|
||||||
logi_circle==0.2.3
|
logi_circle==0.2.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user