mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-12-10 00:30:02 -06:00
Add event platform to ntfy integration (#38726)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
ff07674653
commit
ce84af1e8e
@ -3,6 +3,7 @@ title: ntfy
|
||||
description: Instructions on how to integrate ntfy with Home Assistant.
|
||||
ha_category:
|
||||
- Notifications
|
||||
- Event
|
||||
ha_iot_class: Cloud Push
|
||||
ha_release: 2025.5
|
||||
ha_config_flow: true
|
||||
@ -14,6 +15,7 @@ ha_platforms:
|
||||
- diagnostics
|
||||
- notify
|
||||
- sensor
|
||||
- event
|
||||
ha_quality_scale: bronze
|
||||
---
|
||||
|
||||
@ -102,6 +104,33 @@ data:
|
||||
|
||||
{% enddetails %}
|
||||
|
||||
## Events
|
||||
|
||||
An {% term event %} {% term entity %} is created for each configured topic. These entities subscribe to their respective topics and receive notifications from the **ntfy** service in real-time. Each event entity exposes the full contents of the notification through its attributes. These attributes include links, attachments, tags, and other metadata.
|
||||
|
||||
You can use {% term event %} {% term entities %} in automations. For example, to trigger actions in Home Assistant, or to forward notifications to other devices for further processing or alerting.
|
||||
|
||||
{% details "Example YAML configuration" %}
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
triggers:
|
||||
- trigger: numeric_state
|
||||
entity_id:
|
||||
- event.mytopic
|
||||
attribute: priority
|
||||
above: 4
|
||||
actions:
|
||||
- action: notify.mobile_app_your_device
|
||||
data:
|
||||
message: "Received new ntfy notification"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
{% enddetails %}
|
||||
|
||||
## Actions
|
||||
|
||||
### Publish notification
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user