Add event platform to ntfy integration (#38726)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Manu 2025-09-10 08:14:04 +02:00 committed by GitHub
parent ff07674653
commit ce84af1e8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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