Skip to content

Primary Classes

Automation

custom_components.autoarm.const.ChangeSource

Bases: StrEnum

Enumeration of all the known ways to trigger a state change

Attributes:

Name Type Description
ACTION
ALARM_PANEL
BUTTON
CALENDAR
INTERNAL
MOBILE
NOTIFY
OCCUPANCY
STARTUP
SUNRISE
SUNSET
ZOMBIFICATION

ACTION = auto() class-attribute instance-attribute

ALARM_PANEL = auto() class-attribute instance-attribute

BUTTON = auto() class-attribute instance-attribute

CALENDAR = auto() class-attribute instance-attribute

INTERNAL = auto() class-attribute instance-attribute

MOBILE = auto() class-attribute instance-attribute

NOTIFY = auto() class-attribute instance-attribute

OCCUPANCY = auto() class-attribute instance-attribute

STARTUP = auto() class-attribute instance-attribute

SUNRISE = auto() class-attribute instance-attribute

SUNSET = auto() class-attribute instance-attribute

ZOMBIFICATION = auto() class-attribute instance-attribute

custom_components.autoarm.autoarming.Intervention dataclass

Record of a manual intervention, such as a button push, mobile action or alarm panel change

Conditions

custom_components.autoarm.const.ConditionVariables(occupied, night, state, occupied_defaults, calendar_event=None, at_home=None, not_home=None) dataclass

Field with sub-fields added to the template context of Transition Conditions

Methods:

Name Description
as_dict

Generate the field to be exposed in the context, stringifying alarm states

as_dict()

Generate the field to be exposed in the context, stringifying alarm states

Calendar

custom_components.autoarm.calendar.TrackedCalendar

Listener for a Home Assistant Calendar

Methods:

Name Description
active_events

List all the events matching a state pattern that are currently open

has_active_event

Is there any event matching a state pattern that is currently open

match_events

Query the calendar for events that match state patterns

on_timed_poll

Check for new and dead events, entry point for the timed calendar tracker listener

prune_events

Remove past events

active_events()

List all the events matching a state pattern that are currently open

has_active_event()

Is there any event matching a state pattern that is currently open

match_events() async

Query the calendar for events that match state patterns

on_timed_poll(_called_time) async

Check for new and dead events, entry point for the timed calendar tracker listener

prune_events() async

Remove past events

custom_components.autoarm.calendar.TrackedCalendarEvent

Generate alarm state changes for a Home Assistant Calendar event

Methods:

Name Description
__eq__

Compare two events based on underlying calendar event

end

Handle an event that has reached its finish date and time

event_id

Generate an ID for the calendar even if it doesn't natively support uid

__eq__(other)

Compare two events based on underlying calendar event

end(event_time) async

Handle an event that has reached its finish date and time

event_id(calendar_id, event) classmethod

Generate an ID for the calendar even if it doesn't natively support uid