Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.timer Namespace Reference

Namespaces

 reproduce_state
 

Classes

class  Timer
 
class  TimerStorageCollection
 

Functions

str _format_timedelta (timedelta delta)
 
_T|dict[Any, Any] _T (_T|None value)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_DURATION = "duration"
 
string ATTR_FINISHED_AT = "finished_at"
 
string ATTR_FINISHES_AT = "finishes_at"
 
string ATTR_REMAINING = "remaining"
 
string ATTR_RESTORE = "restore"
 
string CONF_DURATION = "duration"
 
string CONF_RESTORE = "restore"
 
 CONFIG_SCHEMA
 
 default
 
int DEFAULT_DURATION = 0
 
bool DEFAULT_RESTORE = False
 
string DOMAIN = "timer"
 
string ENTITY_ID_FORMAT = DOMAIN + ".{}"
 
string EVENT_TIMER_CANCELLED = "timer.cancelled"
 
string EVENT_TIMER_CHANGED = "timer.changed"
 
string EVENT_TIMER_FINISHED = "timer.finished"
 
string EVENT_TIMER_PAUSED = "timer.paused"
 
string EVENT_TIMER_RESTARTED = "timer.restarted"
 
string EVENT_TIMER_STARTED = "timer.started"
 
 RELOAD_SERVICE_SCHEMA = vol.Schema({})
 
string SERVICE_CANCEL = "cancel"
 
string SERVICE_CHANGE = "change"
 
string SERVICE_FINISH = "finish"
 
string SERVICE_PAUSE = "pause"
 
string SERVICE_START = "start"
 
string STATUS_ACTIVE = "active"
 
string STATUS_IDLE = "idle"
 
string STATUS_PAUSED = "paused"
 
string STORAGE_KEY = DOMAIN
 
int STORAGE_VERSION = 1
 
 VolDictType
 

Detailed Description

Support for Timers.

Function Documentation

◆ _format_timedelta()

str homeassistant.components.timer._format_timedelta ( timedelta  delta)
private

Definition at line 77 of file __init__.py.

◆ _T()

_T | dict[Any, Any] homeassistant.components.timer._T ( _T | None  value)
private

Definition at line 84 of file __init__.py.

◆ async_setup()

bool homeassistant.components.timer.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up an input select.

Definition at line 112 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.timer._LOGGER = logging.getLogger(__name__)
private

Definition at line 32 of file __init__.py.

◆ ATTR_DURATION

string homeassistant.components.timer.ATTR_DURATION = "duration"

Definition at line 40 of file __init__.py.

◆ ATTR_FINISHED_AT

string homeassistant.components.timer.ATTR_FINISHED_AT = "finished_at"

Definition at line 44 of file __init__.py.

◆ ATTR_FINISHES_AT

string homeassistant.components.timer.ATTR_FINISHES_AT = "finishes_at"

Definition at line 42 of file __init__.py.

◆ ATTR_REMAINING

string homeassistant.components.timer.ATTR_REMAINING = "remaining"

Definition at line 41 of file __init__.py.

◆ ATTR_RESTORE

string homeassistant.components.timer.ATTR_RESTORE = "restore"

Definition at line 43 of file __init__.py.

◆ CONF_DURATION

homeassistant.components.timer.CONF_DURATION = "duration"

Definition at line 46 of file __init__.py.

◆ CONF_RESTORE

homeassistant.components.timer.CONF_RESTORE = "restore"

Definition at line 47 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.timer.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  DOMAIN: cv.schema_with_slug_keys(
4  vol.All(
5  _none_to_empty_dict,
6  {
7  vol.Optional(CONF_NAME): cv.string,
8  vol.Optional(CONF_ICON): cv.icon,
9  vol.Optional(CONF_DURATION, default=DEFAULT_DURATION): vol.All(
10  cv.time_period, _format_timedelta
11  ),
12  vol.Optional(CONF_RESTORE, default=DEFAULT_RESTORE): cv.boolean,
13  },
14  )
15  )
16  },
17  extra=vol.ALLOW_EXTRA,
18 )

Definition at line 90 of file __init__.py.

◆ default

homeassistant.components.timer.default

Definition at line 72 of file __init__.py.

◆ DEFAULT_DURATION

int homeassistant.components.timer.DEFAULT_DURATION = 0

Definition at line 37 of file __init__.py.

◆ DEFAULT_RESTORE

bool homeassistant.components.timer.DEFAULT_RESTORE = False

Definition at line 38 of file __init__.py.

◆ DOMAIN

string homeassistant.components.timer.DOMAIN = "timer"

Definition at line 34 of file __init__.py.

◆ ENTITY_ID_FORMAT

string homeassistant.components.timer.ENTITY_ID_FORMAT = DOMAIN + ".{}"

Definition at line 35 of file __init__.py.

◆ EVENT_TIMER_CANCELLED

string homeassistant.components.timer.EVENT_TIMER_CANCELLED = "timer.cancelled"

Definition at line 54 of file __init__.py.

◆ EVENT_TIMER_CHANGED

string homeassistant.components.timer.EVENT_TIMER_CHANGED = "timer.changed"

Definition at line 55 of file __init__.py.

◆ EVENT_TIMER_FINISHED

string homeassistant.components.timer.EVENT_TIMER_FINISHED = "timer.finished"

Definition at line 53 of file __init__.py.

◆ EVENT_TIMER_PAUSED

string homeassistant.components.timer.EVENT_TIMER_PAUSED = "timer.paused"

Definition at line 58 of file __init__.py.

◆ EVENT_TIMER_RESTARTED

string homeassistant.components.timer.EVENT_TIMER_RESTARTED = "timer.restarted"

Definition at line 57 of file __init__.py.

◆ EVENT_TIMER_STARTED

string homeassistant.components.timer.EVENT_TIMER_STARTED = "timer.started"

Definition at line 56 of file __init__.py.

◆ RELOAD_SERVICE_SCHEMA

homeassistant.components.timer.RELOAD_SERVICE_SCHEMA = vol.Schema({})

Definition at line 109 of file __init__.py.

◆ SERVICE_CANCEL

string homeassistant.components.timer.SERVICE_CANCEL = "cancel"

Definition at line 62 of file __init__.py.

◆ SERVICE_CHANGE

string homeassistant.components.timer.SERVICE_CHANGE = "change"

Definition at line 63 of file __init__.py.

◆ SERVICE_FINISH

string homeassistant.components.timer.SERVICE_FINISH = "finish"

Definition at line 64 of file __init__.py.

◆ SERVICE_PAUSE

string homeassistant.components.timer.SERVICE_PAUSE = "pause"

Definition at line 61 of file __init__.py.

◆ SERVICE_START

string homeassistant.components.timer.SERVICE_START = "start"

Definition at line 60 of file __init__.py.

◆ STATUS_ACTIVE

string homeassistant.components.timer.STATUS_ACTIVE = "active"

Definition at line 50 of file __init__.py.

◆ STATUS_IDLE

string homeassistant.components.timer.STATUS_IDLE = "idle"

Definition at line 49 of file __init__.py.

◆ STATUS_PAUSED

string homeassistant.components.timer.STATUS_PAUSED = "paused"

Definition at line 51 of file __init__.py.

◆ STORAGE_KEY

string homeassistant.components.timer.STORAGE_KEY = DOMAIN

Definition at line 66 of file __init__.py.

◆ STORAGE_VERSION

int homeassistant.components.timer.STORAGE_VERSION = 1

Definition at line 67 of file __init__.py.

◆ VolDictType

homeassistant.components.timer.VolDictType

Definition at line 69 of file __init__.py.