File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
homeassistant/components/decora_wifi Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5+ from datetime import timedelta
56import logging
67from typing import Any
78
2526from homeassistant .helpers import config_validation as cv
2627from homeassistant .helpers .entity_platform import AddEntitiesCallback
2728from homeassistant .helpers .typing import ConfigType , DiscoveryInfoType
29+ from homeassistant .util import Throttle
2830
2931_LOGGER = logging .getLogger (__name__ )
3032
@@ -167,6 +169,7 @@ def turn_off(self, **kwargs: Any) -> None:
167169 except ValueError :
168170 _LOGGER .error ("Failed to turn off myLeviton switch" )
169171
172+ @Throttle (timedelta (seconds = 30 ))
170173 def update (self ) -> None :
171174 """Fetch new state data for this switch."""
172175 try :
You can’t perform that action at this time.
0 commit comments