notifier
Notification delivery cap.
Notification delivery cap. Models HA notify.<service> plus future native targets (Telegram / Discord / ntfy / SMTP, …). Designed at the same structural level as a camera cap: rich multi-method surface, full status diagnostics, explicit supports matrix so the UI gates compose-form fields without probing the provider.
One Notifier device per delivery endpoint — HA's notify.mobile_app_* (one per phone), notify.telegram_* (one per chat target), etc. The DeviceRole sub-role (MobilePushNotifier / MessagingNotifier / EmailNotifier / GenericNotifier) discriminates the rendering style of the compose form.
Sub-feature support (image / priority / data / actions / multi- recipient) is signaled by:
- the device's
DeviceFeaturebits — fast scalar check for list filters and grid icons (DeviceFeature.NotifierImage etc.); AND - the slice's
supportsblock — authoritative read after device detail is opened.
At a glance
| Capability | notifier |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | notifier |
| Source | packages/types/src/capabilities/notifier.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
send
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
title | string | no | |
body | string | yes | |
image | string | no | |
priority | "min" | "low" | "normal" | "high" | no | |
channel | string | no | |
recipients | string[] | no | |
actions | ({ id: string; title: string; uri?: string (url); destructive?: boolean })[] | no | |
data | Record<string, unknown> | no |
Output
| Field | Type | Required | Description |
|---|---|---|---|
notificationId | string | yes | |
acceptedAt | number | yes |
Actions (offered in automations and on device cards)
| Action | Label | Sets |
|---|---|---|
notifier.send | Send a notification |
cancel
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
notificationId | string | yes |
Output
Nothing.
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
Runtime-state slice — diagnostics + supports matrix. UI compose form reads supports to gate optional fields; history pane reads lastSentAt / lastError / queueDepth.
| Field | Type | Required | Description |
|---|---|---|---|
lastSentAt | number | yes | Ms epoch of the most recent successful send. 0 if none yet. |
lastError | string | null | yes | Failure description from the most recent send attempt. Null on success or when nothing has been sent yet. |
queueDepth | number | yes | Number of deliveries currently buffered server-side (rate-limited notifiers may queue). 0 when the provider sends synchronously. |
supports | { image: boolean; priority: boolean; data: boolean; actions: boolean; recipients: boolean } | yes | Per-feature capability matrix — authoritative source for the compose-form field gating. |
Events
onSent
Emitted after every send attempt — success or failure. Subscribers (admin UI history pane, automation engines, retry workers) react without polling the provider's lastSentAt.
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | number | yes | |
notificationId | string | yes | |
success | boolean | yes | |
error | string | null | yes | |
acceptedAt | number | yes |