Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.manual.alarm_control_panel.ManualAlarm Class Reference
Inheritance diagram for homeassistant.components.manual.alarm_control_panel.ManualAlarm:
[legend]
Collaboration diagram for homeassistant.components.manual.alarm_control_panel.ManualAlarm:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, str name, str|None unique_id, str|None code, Template|None code_template, bool code_arm_required, bool disarm_after_trigger, dict[str, Any] config)
 
AlarmControlPanelState alarm_state (self)
 
None async_added_to_hass (self)
 
None async_alarm_arm_away (self, str|None code=None)
 
None async_alarm_arm_custom_bypass (self, str|None code=None)
 
None async_alarm_arm_home (self, str|None code=None)
 
None async_alarm_arm_night (self, str|None code=None)
 
None async_alarm_arm_vacation (self, str|None code=None)
 
None async_alarm_disarm (self, str|None code=None)
 
None async_alarm_trigger (self, str|None code=None)
 
None async_scheduled_update (self, datetime.datetime now)
 
CodeFormat|None code_format (self)
 
dict[str, Any] extra_state_attributes (self)
 
- Public Member Functions inherited from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity
None __init_subclass__ (cls, **Any kwargs)
 
None __setattr__ (self, str name, Any value)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
None alarm_arm_away (self, str|None code=None)
 
None alarm_arm_custom_bypass (self, str|None code=None)
 
None alarm_arm_home (self, str|None code=None)
 
None alarm_arm_night (self, str|None code=None)
 
None alarm_arm_vacation (self, str|None code=None)
 
None alarm_disarm (self, str|None code=None)
 
None alarm_trigger (self, str|None code=None)
 
None async_handle_alarm_arm_away (self, str|None code=None)
 
None async_handle_alarm_arm_custom_bypass (self, str|None code=None)
 
None async_handle_alarm_arm_home (self, str|None code=None)
 
None async_handle_alarm_arm_night (self, str|None code=None)
 
None async_handle_alarm_arm_vacation (self, str|None code=None)
 
None async_handle_alarm_disarm (self, str|None code=None)
 
None async_internal_added_to_hass (self)
 
None async_registry_entry_updated (self)
 
str|None changed_by (self)
 
str|None check_code_arm_required (self, str|None code)
 
bool code_arm_required (self)
 
str|None code_or_default_code (self, str|None code)
 
str|None state (self)
 
dict[str, Any]|None state_attributes (self)
 
AlarmControlPanelEntityFeature supported_features (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_will_remove_from_hass (self)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
bool available (self)
 
dict[str, Any]|None capability_attributes (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 
- Public Member Functions inherited from homeassistant.helpers.restore_state.RestoreEntity
ExtraStoredData|None async_get_last_extra_data (self)
 
State|None async_get_last_state (self)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
ExtraStoredData|None extra_restore_state_data (self)
 

Public Attributes

 state
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 

Private Member Functions

AlarmControlPanelState _active_state (self)
 
datetime.timedelta _arming_time (self, AlarmControlPanelState state)
 
None _async_set_state_update_events (self)
 
None _async_update_state (self, AlarmControlPanelState state)
 
None _async_validate_code (self, str|None code, str state)
 
datetime.timedelta _pending_time (self, AlarmControlPanelState state)
 
bool _within_arming_time (self, AlarmControlPanelState state)
 
bool _within_pending_time (self, AlarmControlPanelState state)
 

Private Attributes

 _attr_code_arm_required
 
 _attr_name
 
 _attr_supported_features
 
 _attr_unique_id
 
 _code
 
 _disarm_after_trigger
 
 _hass
 
 _previous_state
 
 _state
 
 _state_ts
 

Static Private Attributes

bool _attr_should_poll = False
 

Additional Inherited Members

- Static Public Attributes inherited from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity
 AlarmControlPanelEntityFeature
 
 bool
 
 None
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

Representation of an alarm status.

When armed, will be arming for 'arming_time', after that armed.
When triggered, will be pending for the triggering state's 'delay_time'.
After that will be triggered for 'trigger_time', after that we return to
the previous state or disarm if `disarm_after_trigger` is true.
A trigger_time of zero disables the alarm_trigger service.

Definition at line 205 of file alarm_control_panel.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.__init__ (   self,
HomeAssistant  hass,
str  name,
str | None  unique_id,
str | None  code,
Template | None  code_template,
bool  code_arm_required,
bool  disarm_after_trigger,
dict[str, Any]  config 
)
Init the manual alarm panel.

Definition at line 217 of file alarm_control_panel.py.

Member Function Documentation

◆ _active_state()

AlarmControlPanelState homeassistant.components.manual.alarm_control_panel.ManualAlarm._active_state (   self)
private
Get the current state.

Definition at line 282 of file alarm_control_panel.py.

◆ _arming_time()

datetime.timedelta homeassistant.components.manual.alarm_control_panel.ManualAlarm._arming_time (   self,
AlarmControlPanelState  state 
)
private
Get the arming time.

Definition at line 291 of file alarm_control_panel.py.

◆ _async_set_state_update_events()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm._async_set_state_update_events (   self)
private

Definition at line 371 of file alarm_control_panel.py.

◆ _async_update_state()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm._async_update_state (   self,
AlarmControlPanelState  state 
)
private
Update the state.

Definition at line 360 of file alarm_control_panel.py.

◆ _async_validate_code()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm._async_validate_code (   self,
str | None  code,
str  state 
)
private
Validate given code.

Definition at line 394 of file alarm_control_panel.py.

◆ _pending_time()

datetime.timedelta homeassistant.components.manual.alarm_control_panel.ManualAlarm._pending_time (   self,
AlarmControlPanelState  state 
)
private
Get the pending time.

Definition at line 296 of file alarm_control_panel.py.

◆ _within_arming_time()

bool homeassistant.components.manual.alarm_control_panel.ManualAlarm._within_arming_time (   self,
AlarmControlPanelState  state 
)
private
Get if the action is in the arming time window.

Definition at line 301 of file alarm_control_panel.py.

◆ _within_pending_time()

bool homeassistant.components.manual.alarm_control_panel.ManualAlarm._within_pending_time (   self,
AlarmControlPanelState  state 
)
private
Get if the action is in the pending time window.

Definition at line 305 of file alarm_control_panel.py.

◆ alarm_state()

AlarmControlPanelState homeassistant.components.manual.alarm_control_panel.ManualAlarm.alarm_state (   self)
Return the state of the device.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 258 of file alarm_control_panel.py.

◆ async_added_to_hass()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_added_to_hass (   self)
Run when entity about to be added to hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 439 of file alarm_control_panel.py.

◆ async_alarm_arm_away()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_alarm_arm_away (   self,
str | None   code = None 
)
Send arm away command.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 330 of file alarm_control_panel.py.

◆ async_alarm_arm_custom_bypass()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_alarm_arm_custom_bypass (   self,
str | None   code = None 
)
Send arm custom bypass command.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 345 of file alarm_control_panel.py.

◆ async_alarm_arm_home()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_alarm_arm_home (   self,
str | None   code = None 
)
Send arm home command.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 325 of file alarm_control_panel.py.

◆ async_alarm_arm_night()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_alarm_arm_night (   self,
str | None   code = None 
)
Send arm night command.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 335 of file alarm_control_panel.py.

◆ async_alarm_arm_vacation()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_alarm_arm_vacation (   self,
str | None   code = None 
)
Send arm vacation command.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 340 of file alarm_control_panel.py.

◆ async_alarm_disarm()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_alarm_disarm (   self,
str | None   code = None 
)
Send disarm command.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 318 of file alarm_control_panel.py.

◆ async_alarm_trigger()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_alarm_trigger (   self,
str | None   code = None 
)
Send alarm trigger command.

No code needed, a trigger time of zero for the current state
disables the alarm.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 350 of file alarm_control_panel.py.

◆ async_scheduled_update()

None homeassistant.components.manual.alarm_control_panel.ManualAlarm.async_scheduled_update (   self,
datetime.datetime  now 
)
Update state at a scheduled point in time.

Definition at line 435 of file alarm_control_panel.py.

◆ code_format()

CodeFormat | None homeassistant.components.manual.alarm_control_panel.ManualAlarm.code_format (   self)
Return one or more digits/characters.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 310 of file alarm_control_panel.py.

◆ extra_state_attributes()

dict[str, Any] homeassistant.components.manual.alarm_control_panel.ManualAlarm.extra_state_attributes (   self)
Return the state attributes.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 418 of file alarm_control_panel.py.

Member Data Documentation

◆ _attr_code_arm_required

homeassistant.components.manual.alarm_control_panel.ManualAlarm._attr_code_arm_required
private

Definition at line 234 of file alarm_control_panel.py.

◆ _attr_name

homeassistant.components.manual.alarm_control_panel.ManualAlarm._attr_name
private

Definition at line 231 of file alarm_control_panel.py.

◆ _attr_should_poll

bool homeassistant.components.manual.alarm_control_panel.ManualAlarm._attr_should_poll = False
staticprivate

Definition at line 215 of file alarm_control_panel.py.

◆ _attr_supported_features

homeassistant.components.manual.alarm_control_panel.ManualAlarm._attr_supported_features
private

Definition at line 251 of file alarm_control_panel.py.

◆ _attr_unique_id

homeassistant.components.manual.alarm_control_panel.ManualAlarm._attr_unique_id
private

Definition at line 232 of file alarm_control_panel.py.

◆ _code

homeassistant.components.manual.alarm_control_panel.ManualAlarm._code
private

Definition at line 233 of file alarm_control_panel.py.

◆ _disarm_after_trigger

homeassistant.components.manual.alarm_control_panel.ManualAlarm._disarm_after_trigger
private

Definition at line 235 of file alarm_control_panel.py.

◆ _hass

homeassistant.components.manual.alarm_control_panel.ManualAlarm._hass
private

Definition at line 230 of file alarm_control_panel.py.

◆ _previous_state

homeassistant.components.manual.alarm_control_panel.ManualAlarm._previous_state
private

Definition at line 365 of file alarm_control_panel.py.

◆ _state

homeassistant.components.manual.alarm_control_panel.ManualAlarm._state
private

Definition at line 260 of file alarm_control_panel.py.

◆ _state_ts

homeassistant.components.manual.alarm_control_panel.ManualAlarm._state_ts
private

Definition at line 322 of file alarm_control_panel.py.

◆ state

homeassistant.components.manual.alarm_control_panel.ManualAlarm.state

Definition at line 426 of file alarm_control_panel.py.


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