Home Assistant Unofficial Reference 2024.12.1
homeassistant.util.timeout.TimeoutManager Class Reference

Public Member Functions

None __init__ (self)
 
_ZoneFreezeContext|_GlobalFreezeContext async_freeze (self, str zone_name=ZONE_GLOBAL)
 
_ZoneTaskContext|_GlobalTaskContext async_timeout (self, float timeout, str zone_name=ZONE_GLOBAL, float cool_down=0)
 
None drop_zone (self, str zone_name)
 
_ZoneFreezeContext|_GlobalFreezeContext freeze (self, str zone_name=ZONE_GLOBAL)
 
bool freezes_done (self)
 
list[_GlobalFreezeContextglobal_freezes (self)
 
list[_GlobalTaskContextglobal_tasks (self)
 
dict[str, _ZoneTimeoutManagerzones (self)
 
bool zones_done (self)
 

Detailed Description

Class to manage timeouts over different zones.

Manages both global and zone based timeouts.

Definition at line 440 of file timeout.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.util.timeout.TimeoutManager.__init__ (   self)
Initialize TimeoutManager.

Definition at line 446 of file timeout.py.

Member Function Documentation

◆ async_freeze()

_ZoneFreezeContext | _GlobalFreezeContext homeassistant.util.timeout.TimeoutManager.async_freeze (   self,
str   zone_name = ZONE_GLOBAL 
)
Freeze all timer until job is done.

For using as Async Context Manager.

Definition at line 511 of file timeout.py.

◆ async_timeout()

_ZoneTaskContext | _GlobalTaskContext homeassistant.util.timeout.TimeoutManager.async_timeout (   self,
float  timeout,
str   zone_name = ZONE_GLOBAL,
float   cool_down = 0 
)
Timeout based on a zone.

For using as Async Context Manager.

Definition at line 488 of file timeout.py.

◆ drop_zone()

None homeassistant.util.timeout.TimeoutManager.drop_zone (   self,
str  zone_name 
)
Drop a zone out of scope.

Definition at line 478 of file timeout.py.

◆ freeze()

_ZoneFreezeContext | _GlobalFreezeContext homeassistant.util.timeout.TimeoutManager.freeze (   self,
str   zone_name = ZONE_GLOBAL 
)
Freeze all timer until job is done.

For using as Context Manager.

Definition at line 530 of file timeout.py.

◆ freezes_done()

bool homeassistant.util.timeout.TimeoutManager.freezes_done (   self)
Return True if all freezes are finished.

Definition at line 459 of file timeout.py.

◆ global_freezes()

list[_GlobalFreezeContext] homeassistant.util.timeout.TimeoutManager.global_freezes (   self)
Return all global Freezes.

Definition at line 474 of file timeout.py.

◆ global_tasks()

list[_GlobalTaskContext] homeassistant.util.timeout.TimeoutManager.global_tasks (   self)
Return all global Tasks.

Definition at line 469 of file timeout.py.

◆ zones()

dict[str, _ZoneTimeoutManager] homeassistant.util.timeout.TimeoutManager.zones (   self)
Return all Zones.

Definition at line 464 of file timeout.py.

◆ zones_done()

bool homeassistant.util.timeout.TimeoutManager.zones_done (   self)
Return True if all zones are finished.

Definition at line 454 of file timeout.py.


The documentation for this class was generated from the following file: