diff --git a/homeassistant/components/decora_wifi/light.py b/homeassistant/components/decora_wifi/light.py index 9ad1d9ced04dd4..40a9da49f5d361 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.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 @@ def turn_off(self, **kwargs: Any) -> None: 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: