Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.intent.timers Namespace Reference

Classes

class  CancelAllTimersIntentHandler
 
class  CancelTimerIntentHandler
 
class  DecreaseTimerIntentHandler
 
class  FindTimerFilter
 
class  IncreaseTimerIntentHandler
 
class  MultipleTimersMatchedError
 
class  PauseTimerIntentHandler
 
class  StartTimerIntentHandler
 
class  TimerEventType
 
class  TimerInfo
 
class  TimerManager
 
class  TimerNotFoundError
 
class  TimersNotSupportedError
 
class  TimerStatusIntentHandler
 
class  UnpauseTimerIntentHandler
 

Functions

TimerInfo _find_timer (HomeAssistant hass, str|None device_id, dict[str, Any] slots, FindTimerFilter|None find_filter=None)
 
list[TimerInfo_find_timers (HomeAssistant hass, str|None device_id, dict[str, Any] slots)
 
int _get_total_seconds (dict[str, Any] slots)
 
str _normalize_name (str name)
 
tuple[int, int, int] _round_time (int hours, int minutes, int seconds)
 
bool async_device_supports_timers (HomeAssistant hass, str device_id)
 
Callable[[], None] async_register_timer_handler (HomeAssistant hass, str device_id, TimerHandler handler)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string MULTIPLE_TIMERS_MATCHED_RESPONSE = "multiple_timers_matched"
 
string NO_TIMER_SUPPORT_RESPONSE = "no_timer_support"
 
string TIMER_NOT_FOUND_RESPONSE = "timer_not_found"
 
 TimerHandler
 

Detailed Description

Timer implementation for intents.

Function Documentation

◆ _find_timer()

TimerInfo homeassistant.components.intent.timers._find_timer ( HomeAssistant  hass,
str | None  device_id,
dict[str, Any]  slots,
FindTimerFilter | None   find_filter = None 
)
private
Match a single timer with constraints or raise an error.

Definition at line 508 of file timers.py.

◆ _find_timers()

list[TimerInfo] homeassistant.components.intent.timers._find_timers ( HomeAssistant  hass,
str | None  device_id,
dict[str, Any]   slots 
)
private
Match multiple timers with constraints or raise an error.

Definition at line 645 of file timers.py.

◆ _get_total_seconds()

int homeassistant.components.intent.timers._get_total_seconds ( dict[str, Any]  slots)
private
Return the total number of seconds from hours/minutes/seconds slots.

Definition at line 744 of file timers.py.

◆ _normalize_name()

str homeassistant.components.intent.timers._normalize_name ( str  name)
private
Normalize name for comparison.

Definition at line 739 of file timers.py.

◆ _round_time()

tuple[int, int, int] homeassistant.components.intent.timers._round_time ( int  hours,
int  minutes,
int  seconds 
)
private
Round time to a lower precision for feedback.

Definition at line 759 of file timers.py.

◆ async_device_supports_timers()

bool homeassistant.components.intent.timers.async_device_supports_timers ( HomeAssistant  hass,
str  device_id 
)
Return True if device has been registered to handle timer events.

Definition at line 478 of file timers.py.

◆ async_register_timer_handler()

Callable[[], None] homeassistant.components.intent.timers.async_register_timer_handler ( HomeAssistant  hass,
str  device_id,
TimerHandler   handler 
)
Register a handler for timer events.

Returns a callable to unregister.

Definition at line 487 of file timers.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.intent.timers._LOGGER = logging.getLogger(__name__)
private

Definition at line 28 of file timers.py.

◆ MULTIPLE_TIMERS_MATCHED_RESPONSE

string homeassistant.components.intent.timers.MULTIPLE_TIMERS_MATCHED_RESPONSE = "multiple_timers_matched"

Definition at line 31 of file timers.py.

◆ NO_TIMER_SUPPORT_RESPONSE

string homeassistant.components.intent.timers.NO_TIMER_SUPPORT_RESPONSE = "no_timer_support"

Definition at line 32 of file timers.py.

◆ TIMER_NOT_FOUND_RESPONSE

string homeassistant.components.intent.timers.TIMER_NOT_FOUND_RESPONSE = "timer_not_found"

Definition at line 30 of file timers.py.

◆ TimerHandler

homeassistant.components.intent.timers.TimerHandler

Definition at line 176 of file timers.py.