Core Classes¶
classDiagram
Notification "1" *-- "*" Envelope
Notification "1" *-- "1" ConditionVariables
Envelope "1" ..> "1" DeliveryMethod
SupernotificationConfiguration "1" o-- "0..*" Scenario
SupernotificationConfiguration "1" o-- "0..*" Snooze
custom_components.supernotify.delivery_method.DeliveryMethod
¶
METHOD | DESCRIPTION |
---|---|
deliver |
Delivery implementation |
initialize |
Async post-construction initialization |
recipient_target |
Pick out delivery appropriate target from a single person’s (recipient) config |
select_target |
Confirm if target appropriate for this delivery method |
validate_action |
Override in subclass if delivery method has fixed action or doesn’t require one |
validate_deliveries |
Validate list of deliveries at startup for this method |
deliver(envelope)
abstractmethod
async
¶
Delivery implementation
envelope (Envelope): envelope to be delivered
initialize()
async
¶
Async post-construction initialization
recipient_target(recipient)
¶
Pick out delivery appropriate target from a single person’s (recipient) config
select_target(target)
¶
Confirm if target appropriate for this delivery method
target (str): Target, typically an entity ID, or an email address, phone number
validate_action(action)
¶
Override in subclass if delivery method has fixed action or doesn’t require one
validate_deliveries()
async
¶
Validate list of deliveries at startup for this method
custom_components.supernotify.notification.Notification
¶
Bases: ArchivableObject
METHOD | DESCRIPTION |
---|---|
apply_enabled_scenarios |
Set media and action_groups from scenario if defined, first come first applied |
base_filename |
ArchiveableObject implementation |
contents |
ArchiveableObject implementation |
default_media_from_actions |
If no media defined, look for iOS / Android actions that have media defined |
initialize |
Async post-construction initialization |
record_resolve |
Debug support for recording detailed target resolution in archived notification |
apply_enabled_scenarios()
¶
Set media and action_groups from scenario if defined, first come first applied
base_filename()
¶
ArchiveableObject implementation
contents(minimal=False)
¶
ArchiveableObject implementation
default_media_from_actions()
¶
If no media defined, look for iOS / Android actions that have media defined
initialize()
async
¶
Async post-construction initialization
record_resolve(delivery_name, category, resolved)
¶
Debug support for recording detailed target resolution in archived notification
custom_components.supernotify.envelope.Envelope
¶
Wrap a notification with a specific set of targets and service data possibly customized for those targets
METHOD | DESCRIPTION |
---|---|
__eq__ |
Specialized equality check for subset of attributesfl |
core_action_data |
Build the core set of |
grab_image |
Grab an image from a camera, snapshot URL, MQTT Image etc |
custom_components.supernotify.scenario.Scenario
¶
METHOD | DESCRIPTION |
---|---|
attributes |
Return scenario attributes |
evaluate |
Evaluate scenario conditions |
trace |
Trace scenario delivery |
validate |
Validate Home Assistant conditiion definition at initiation |
attributes(include_condition=True, include_trace=False)
¶
Return scenario attributes
evaluate(condition_variables=None)
async
¶
Evaluate scenario conditions
trace(condition_variables=None, config=None)
async
¶
Trace scenario delivery
validate()
async
¶
Validate Home Assistant conditiion definition at initiation
custom_components.supernotify.snoozer.Snooze
¶
custom_components.supernotify.ConditionVariables
dataclass
¶
Variables presented to all condition evaluations
Attributes¶
applied_scenarios (list[str]): Scenarios that have been applied
required_scenarios (list[str]): Scenarios that must be applied
notification_priority (str): Priority of the notification
notification_message (str): Message of the notification
notification_title (str): Title of the notification
occupancy (list[str]): List of occupancy scenarios