Home Assistant Discord Notification Starter
Status: Draft
Last tested: TBD
Works with: Home Assistant, Discord webhook or bot integration
Category: Home Assistant / Discord
Difficulty: Beginner
Problem
Home Assistant notifications are useful, but mobile push alerts can get noisy. Discord is a good place for household/system alerts because messages are searchable and can be routed into channels.
What you will build
A basic Home Assistant automation that sends a Discord message when a sensor or event changes.
Requirements
- Home Assistant running
- Discord webhook or Discord bot notification service
- A test entity such as a door sensor, motion sensor, or smart plug
Quick version
alias: Discord alert - example sensor changed
trigger:
- platform: state
entity_id: binary_sensor.example_motion
to: "on"
action:
- service: notify.discord
data:
message: "Motion detected: {{ trigger.to_state.name }}"
mode: single
Step-by-step setup
Step 1: Create a Discord notification service
Use either a Discord webhook integration or a bot-backed notification service. Confirm the service name in Developer Tools -> Services.
Step 2: Pick a test entity
Start with something harmless, like a motion sensor or test helper.
Step 3: Create the automation
Paste the YAML into Home Assistant's automation editor or `automations.yaml`, then replace:
- `binary_sensor.example_motion`
- `notify.discord`
- message text
Step 4: Trigger the entity
Walk in front of the motion sensor, toggle the helper, or temporarily change the trigger for testing.
Verification
- Home Assistant automation trace shows the action ran.
- Discord receives exactly one message.
- No repeated spam occurs while the entity remains on.
Troubleshooting
| Symptom | Likely cause | Fix |
| --- | --- | --- |
| No message | Wrong notify service name | Check Developer Tools -> Services |
| Too many messages | Trigger fires repeatedly | Add `for:` or cooldown logic |
| Message lacks detail | Template too simple | Add entity name, timestamp, or state attributes |
Optional upgrades
- Route alerts by severity into different Discord channels.
- Add quiet hours.
- Add actionable buttons if your platform supports them.
- Use templates for consistent formatting.