Public Member Functions | |
| None | __init__ (self, HomeAssistant hass, float delay_seconds) |
Private Member Functions | |
| Callable[_P, None] | _P (self, Callable[_P, Any] method) |
Private Attributes | |
| _active | |
| _delay | |
| _lock | |
| _next_ts | |
| _schedule | |
Helper class to provide service call rate throttling. This class provides a decorator to decorate service methods that need to be throttled to not exceed a certain call rate per second. One instance can be used on multiple service methods to archive an overall throttling. As this uses track_point_in_utc_time to schedule delayed executions it should not block the mainloop.
Definition at line 127 of file __init__.py.
| None homeassistant.components.pilight.CallRateDelayThrottle.__init__ | ( | self, | |
| HomeAssistant | hass, | ||
| float | delay_seconds | ||
| ) |
Initialize the delay handler.
Definition at line 139 of file __init__.py.
|
private |
Decorate to delay calls on a certain method.
Definition at line 148 of file __init__.py.
|
private |
Definition at line 143 of file __init__.py.
|
private |
Definition at line 141 of file __init__.py.
|
private |
Definition at line 144 of file __init__.py.
|
private |
Definition at line 145 of file __init__.py.
|
private |
Definition at line 146 of file __init__.py.