From 9964cb512af4f91031922add2cef9f2cdb23a8ad Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 21 Nov 2025 14:16:03 +0100 Subject: [PATCH] Throttle Decora wifi updates (#156994) --- homeassistant/components/decora_wifi/light.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/decora_wifi/light.py b/homeassistant/components/decora_wifi/light.py index 9ad1d9ced04d..40a9da49f5d3 100644 --- a/homeassistant/components/decora_wifi/light.py +++ b/homeassistant/components/decora_wifi/light.py @@ -2,6 +2,7 @@ from __future__ import annotations +from datetime import timedelta import logging from typing import Any @@ -25,6 +26,7 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers import config_validation as cv from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType +from homeassistant.util import Throttle _LOGGER = logging.getLogger(__name__) @@ -167,6 +169,7 @@ class DecoraWifiLight(LightEntity): except ValueError: _LOGGER.error("Failed to turn off myLeviton switch") + @Throttle(timedelta(seconds=30)) def update(self) -> None: """Fetch new state data for this switch.""" try: