Skip to content

Commit c116a9c

Browse files
authored
Add debounce to Alexa Devices coordinator (home-assistant#156609)
1 parent fb58758 commit c116a9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

homeassistant/components/alexa_devices/coordinator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from homeassistant.core import HomeAssistant
1717
from homeassistant.exceptions import ConfigEntryAuthFailed
1818
from homeassistant.helpers import device_registry as dr
19+
from homeassistant.helpers.debounce import Debouncer
1920
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
2021

2122
from .const import _LOGGER, CONF_LOGIN_DATA, DOMAIN
@@ -43,6 +44,9 @@ def __init__(
4344
name=entry.title,
4445
config_entry=entry,
4546
update_interval=timedelta(seconds=SCAN_INTERVAL),
47+
request_refresh_debouncer=Debouncer(
48+
hass, _LOGGER, cooldown=30, immediate=False
49+
),
4650
)
4751
self.api = AmazonEchoApi(
4852
session,

0 commit comments

Comments
 (0)