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

Public Member Functions

def __init__ (self, hass, name, code, code_template, disarm_after_trigger, state_topic, command_topic, qos, code_arm_required, payload_disarm, payload_arm_home, payload_arm_away, payload_arm_night, payload_arm_vacation, payload_arm_custom_bypass, 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)
 
def async_scheduled_update (self, 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_internal_will_remove_from_hass (self)
 
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 Attributes

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

Private Member Functions

def _active_state (self)
 
None _async_state_changed_listener (self, Event[EventStateChangedData] event)
 
None _async_update_state (self, str state)
 
def _async_validate_code (self, code, state)
 
def _pending_time (self, state)
 
def _within_pending_time (self, state)
 

Private Attributes

 _attr_code_arm_required
 
 _attr_name
 
 _code
 
 _command_topic
 
 _delay_time_by_state
 
 _disarm_after_trigger
 
 _hass
 
 _payload_arm_away
 
 _payload_arm_custom_bypass
 
 _payload_arm_home
 
 _payload_arm_night
 
 _payload_arm_vacation
 
 _payload_disarm
 
 _pending_time_by_state
 
 _previous_state
 
 _qos
 
 _state
 
 _state_topic
 
 _state_ts
 
 _trigger_time_by_state
 

Static Private Attributes

bool _attr_should_poll = False
 
tuple _attr_supported_features
 

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 pending for 'pending_time', after that armed.
When triggered, will be pending for the triggering state's 'delay_time'
plus the triggered state's 'pending_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 232 of file alarm_control_panel.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm.__init__ (   self,
  hass,
  name,
  code,
  code_template,
  disarm_after_trigger,
  state_topic,
  command_topic,
  qos,
  code_arm_required,
  payload_disarm,
  payload_arm_home,
  payload_arm_away,
  payload_arm_night,
  payload_arm_vacation,
  payload_arm_custom_bypass,
  config 
)
Init the manual MQTT alarm panel.

Definition at line 253 of file alarm_control_panel.py.

Member Function Documentation

◆ _active_state()

def homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._active_state (   self)
private
Get the current state.

Definition at line 331 of file alarm_control_panel.py.

◆ _async_state_changed_listener()

None homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._async_state_changed_listener (   self,
Event[EventStateChangedData]   event 
)
private
Publish state change to MQTT.

Definition at line 488 of file alarm_control_panel.py.

◆ _async_update_state()

None homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._async_update_state (   self,
str  state 
)
private
Update the state.

Definition at line 399 of file alarm_control_panel.py.

◆ _async_validate_code()

def homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._async_validate_code (   self,
  code,
  state 
)
private
Validate given code.

Definition at line 426 of file alarm_control_panel.py.

◆ _pending_time()

def homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._pending_time (   self,
  state 
)
private
Get the pending time.

Definition at line 337 of file alarm_control_panel.py.

◆ _within_pending_time()

def homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._within_pending_time (   self,
  state 
)
private
Get if the action is in the pending time window.

Definition at line 344 of file alarm_control_panel.py.

◆ alarm_state()

AlarmControlPanelState homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm.alarm_state (   self)
Return the state of the device.

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 309 of file alarm_control_panel.py.

◆ async_added_to_hass()

None homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm.async_added_to_hass (   self)
Subscribe to MQTT events.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 460 of file alarm_control_panel.py.

◆ async_alarm_arm_away()

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

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 369 of file alarm_control_panel.py.

◆ async_alarm_arm_custom_bypass()

None homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm.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 384 of file alarm_control_panel.py.

◆ async_alarm_arm_home()

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

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 364 of file alarm_control_panel.py.

◆ async_alarm_arm_night()

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

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 374 of file alarm_control_panel.py.

◆ async_alarm_arm_vacation()

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

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 379 of file alarm_control_panel.py.

◆ async_alarm_disarm()

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

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 357 of file alarm_control_panel.py.

◆ async_alarm_trigger()

None homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm.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 389 of file alarm_control_panel.py.

◆ async_scheduled_update()

def homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm.async_scheduled_update (   self,
  now 
)
Update state at a scheduled point in time.

Definition at line 456 of file alarm_control_panel.py.

◆ code_format()

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

Reimplemented from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Definition at line 349 of file alarm_control_panel.py.

◆ extra_state_attributes()

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

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 446 of file alarm_control_panel.py.

Member Data Documentation

◆ _attr_code_arm_required

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._attr_code_arm_required
private

Definition at line 300 of file alarm_control_panel.py.

◆ _attr_name

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._attr_name
private

Definition at line 275 of file alarm_control_panel.py.

◆ _attr_should_poll

bool homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._attr_should_poll = False
staticprivate

Definition at line 243 of file alarm_control_panel.py.

◆ _attr_supported_features

tuple homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._attr_supported_features
staticprivate
Initial value:
= (
AlarmControlPanelEntityFeature.ARM_HOME
| AlarmControlPanelEntityFeature.ARM_AWAY
| AlarmControlPanelEntityFeature.ARM_NIGHT
| AlarmControlPanelEntityFeature.ARM_VACATION
| AlarmControlPanelEntityFeature.TRIGGER
| AlarmControlPanelEntityFeature.ARM_CUSTOM_BYPASS
)

Definition at line 244 of file alarm_control_panel.py.

◆ _code

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._code
private

Definition at line 277 of file alarm_control_panel.py.

◆ _command_topic

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._command_topic
private

Definition at line 298 of file alarm_control_panel.py.

◆ _delay_time_by_state

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._delay_time_by_state
private

Definition at line 284 of file alarm_control_panel.py.

◆ _disarm_after_trigger

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._disarm_after_trigger
private

Definition at line 280 of file alarm_control_panel.py.

◆ _hass

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._hass
private

Definition at line 274 of file alarm_control_panel.py.

◆ _payload_arm_away

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._payload_arm_away
private

Definition at line 303 of file alarm_control_panel.py.

◆ _payload_arm_custom_bypass

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._payload_arm_custom_bypass
private

Definition at line 306 of file alarm_control_panel.py.

◆ _payload_arm_home

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._payload_arm_home
private

Definition at line 302 of file alarm_control_panel.py.

◆ _payload_arm_night

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._payload_arm_night
private

Definition at line 304 of file alarm_control_panel.py.

◆ _payload_arm_vacation

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._payload_arm_vacation
private

Definition at line 305 of file alarm_control_panel.py.

◆ _payload_disarm

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._payload_disarm
private

Definition at line 301 of file alarm_control_panel.py.

◆ _pending_time_by_state

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._pending_time_by_state
private

Definition at line 292 of file alarm_control_panel.py.

◆ _previous_state

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._previous_state
private

Definition at line 281 of file alarm_control_panel.py.

◆ _qos

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._qos
private

Definition at line 299 of file alarm_control_panel.py.

◆ _state

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._state
private

Definition at line 273 of file alarm_control_panel.py.

◆ _state_topic

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._state_topic
private

Definition at line 297 of file alarm_control_panel.py.

◆ _state_ts

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._state_ts
private

Definition at line 282 of file alarm_control_panel.py.

◆ _trigger_time_by_state

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm._trigger_time_by_state
private

Definition at line 288 of file alarm_control_panel.py.

◆ state

homeassistant.components.manual_mqtt.alarm_control_panel.ManualMQTTAlarm.state

Definition at line 333 of file alarm_control_panel.py.


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