Repository navigation
Choosing an Alert Kind
When you add an alert, the first thing Alert Redux asks is its kind: how it decides when to fire. The kind can't be changed afterwards (delete and recreate the alert instead), so it's worth a moment's thought.
| You want to be told when… | Kind | Simplest recipe |
|---|---|---|
an entity is in a particular state (a door open, a device unavailable) |
State | Garage door left open |
| a number is too high or too low | Threshold | Freezer too warm |
| something only a template can express | Template | Alarm not armed while away |
| one thing should start it and a different thing should end it | On/off | Dishwasher needs emptying |
| another alert has been ignored (or in some state) for a while | Alert state | Leak not acknowledged |
| something happened (a trigger fired), and it should stay up for a while | Trigger | Motion while away |
| an event appeared on the event bus | Bus event | Errors in the log |
| an automation decides when it starts and stops | Manual | Clean laundry ready |
| the same alert for many similar entities | a generator | Low batteries everywhere |
flowchart TD
A[What makes it fire?] --> B{A condition that is<br>true for a while?}
B -- yes --> C{Same alert for many<br>similar entities?}
C -- yes --> G[Generator]
C -- no --> D{One entity in<br>one state?}
D -- yes --> S[State]
D -- no --> E{A number above<br>or below a limit?}
E -- yes --> T[Threshold]
E -- no --> F{Ends on a different<br>criterion than it starts?}
F -- yes --> O[On/off]
F -- no --> H{About another<br>alert's state?}
H -- yes --> AS[Alert state]
H -- no --> TE[Template]
B -- no --> I{A moment: something<br>happened?}
I -- yes --> J{A Home Assistant<br>trigger, or a bus event?}
J -- trigger --> TR[Trigger]
J -- bus event --> EV[Bus event]
I -- no --> M[Manual: your automation<br>fires and dismisses it]
These fire while something is true, and stop by themselves when it isn't. They all share some settings:
- Extra condition: a template that must also be true. "Only at night", "only when nobody's home", "only while the pump is meant to be running".
-
Delay before firing (
delay_on): the condition must hold this long first. This is what turns "the door is open" into "the door has been left open". -
Delay before ending (
delay_off): the condition must stay false this long before the alert stops. It absorbs flicker: a sensor that drops out for a second doesn't end the alert and start a new one. - No-data grace period: how long a firing alert carries on when its inputs go unavailable, before giving up (10 minutes by default).
How to pick between them:
- Prefer State and Threshold where they fit. They know exactly which entity they're watching, so when it goes missing the alert can say so precisely (missing inputs: sensor.freezer_temperature). For "X has been open for 10 minutes", use a State alert with a delay, not a template.
-
Threshold over a template comparison, because of hysteresis: a freezer
alarm at −12 °C with hysteresis 2 ends at −14 °C, so a temperature hovering around
−12 doesn't fire it on and off. Limits can be templates too (an
input_numberyou can adjust from a dashboard). -
Template for anything else: several entities, attributes, time, arithmetic. It
must render clearly true or false; anything else (an error,
unknown) counts as no data, not false, so a broken template shows up instead of hiding. - On/off when starting and stopping are different questions. "The dishwasher finished" starts it; "someone opened the dishwasher" ends it. Each side can be a template, triggers, or both, and counts when it becomes true.
- Alert state to watch another alert: "the leak alert has been active (unacknowledged) for 15 minutes". It's how you escalate without writing an automation, and the escalation gets its own notifications, card entry, and history.
These fire on a moment (a doorbell press, motion, a log error), and stay firing
for a duration (by default, set by priority: Emergency 60 minutes down to
Informational 5). Firing again while firing restarts the duration and counts up (its
fire_count), without losing an acknowledgement.
-
Trigger: any trigger an automation could use (state, numeric state, time,
calendar, sun, MQTT, webhook, …), with an optional condition that can see
trigger. - Bus event: an event type on Home Assistant's event bus, optionally only when its data matches.
Use these when there's no ongoing condition to watch: the motion has already stopped by the time you read the message, but you still want to know.
A manual alert does nothing by itself: an automation (or script, or you) fires it
with alert_redux.fire and ends it with alert_redux.dismiss. Use one when the
logic already lives in an automation, or needs several steps to detect ("the
washer's power dropped below 3 W for two minutes after running for at least ten").
A manual alert can also end by itself after a duration, and the card can offer
to dismiss it ("I've emptied the washer").
Data passed when firing is kept as fire_data for its messages: "Delivered by
{{ fire_data.carrier }}".
A generator isn't a kind of alert, but a way to make many: one State, Threshold, Template, On/off, or Alert state alert for every entity that matches its targets (a label, an area, a domain, a device class, an entity ID pattern). New entities get their alert automatically. See Generators: One Alert per Device.
| Setting | Use it for |
|---|---|
| Priority | How urgent it is: Emergency, Critical, Warning, Notice, Informational. Orders and colours the card, decides what gets through quiet hours, and sets iOS interruption levels. |
| Acknowledgeable | Off for alerts that mustn't be silenced while the condition lasts (Smoke detected) or that are status, not news (Vacation mode on). |
| Keep until acknowledged | For alerts that matter even if they stop before anyone sees them. See Keeping Alerts Until Acknowledged. |
| Subject entity | What the alert is about, for its messages (subject_entity_name). Defaults to the entity it watches. |
| Notifications and messages | Who is told, how often reminded, the messages, and buttons. See Designing Your Notifications. |
| Supersession | Which other alerts this one silences while it fires. See Escalation and Supersession. |
| Area and labels | Where the alert belongs, for filtering cards and for actions that target an area or label. |
| Voice assistants | Proxies for Alexa and Google Home. See Voice Control. |
Start here
Recipes
- Security and Doors
- Leaks and Climate
- Appliances and Chores
- Devices and Infrastructure
- Reminders and Household Events
Patterns
- Escalation and Supersession
- Keeping Alerts Until Acknowledged
- Generators: One Alert per Device
- Designing Your Notifications
- Taking Alerts Out of Service
- Voice Control
- Building on Alert Redux
- Reacting to Alerts
Moving and maintaining