mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Reduced polling interval for mutesync integration (#49884)
This commit is contained in:
parent
adba82de8b
commit
dcaefe9f5a
@ -26,7 +26,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
async def update_data():
|
||||
"""Update the data."""
|
||||
async with async_timeout.timeout(5):
|
||||
async with async_timeout.timeout(2.5):
|
||||
return await client.get_state()
|
||||
|
||||
coordinator = hass.data.setdefault(DOMAIN, {})[
|
||||
@ -35,7 +35,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
hass,
|
||||
logging.getLogger(__name__),
|
||||
name=DOMAIN,
|
||||
update_interval=timedelta(seconds=10),
|
||||
update_interval=timedelta(seconds=5),
|
||||
update_method=update_data,
|
||||
)
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
|
@ -26,7 +26,7 @@ async def validate_input(hass: HomeAssistant, data: dict[str, Any]) -> dict[str,
|
||||
"""
|
||||
session = hass.helpers.aiohttp_client.async_get_clientsession()
|
||||
try:
|
||||
async with async_timeout.timeout(10):
|
||||
async with async_timeout.timeout(5):
|
||||
token = await mutesync.authenticate(session, data["host"])
|
||||
except aiohttp.ClientResponseError as error:
|
||||
if error.status == 403:
|
||||
|
Loading…
x
Reference in New Issue
Block a user