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
MOBILE
OCCUPANCY
STARTUP
SUNRISE
SUNSET
TOD
UNKNOWN
VOICE
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

MOBILE = 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

TOD = auto() class-attribute instance-attribute

UNKNOWN = auto() class-attribute instance-attribute

VOICE = 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, unoccupied, night, state, occupied_defaults, calendar_event=None, at_home=None, not_home=None, bedtime=False, after_bedtime=False, programmed_bedtime=True, occupied_after_bedtime=AlarmControlPanelState.ARMED_HOME) 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_events.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

has_event_on_day

Is there an event matching one of these states that starts, ends or spans this day

last_event_ended_today

End time and state of the state-matching event that most recently ended today

match_events

Query the calendar for events that match state patterns

on_calendar_state_change

Poll immediately when calendar entity changes, e.g. on an edit, rather than wait for timed poll

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

has_event_on_day(day, states) async

Is there an event matching one of these states that starts, ends or spans this day

last_event_ended_today() async

End time and state of the state-matching event that most recently ended today

match_events() async

Query the calendar for events that match state patterns

on_calendar_state_change(_event) async

Poll immediately when calendar entity changes, e.g. on an edit, rather than wait for timed poll

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_events.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

end_early

End an event ahead of its finish time, staying tracked until then so a poll doesn't start it again

ends_today

Is today the last day of the event, where an all day event ends at the midnight after its last day

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

end_early() async

End an event ahead of its finish time, staying tracked until then so a poll doesn't start it again

ends_today()

Is today the last day of the event, where an all day event ends at the midnight after its last day

event_id(calendar_id, event) classmethod

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

Times of the Day

custom_components.autoarm.time_of_day.TrackedTimeOfDay

Generate alarm state changes for a Home Assistant Times of the Day sensor

The alarm is held at the sensor's state for the period it is on, unless a calendar event is live