Skip to content

Commit 48592c6

Browse files
tr4nt0rc0ffeeca7
andauthored
Add ntfy.publish action to ntfy integration (#38725)
Co-authored-by: c0ffeeca7 <[email protected]>
1 parent 2176216 commit 48592c6

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

source/_integrations/ntfy.markdown

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,59 @@ data:
102102
103103
{% enddetails %}
104104
105+
## Actions
106+
107+
### Publish notification
108+
109+
For more customizable notifications, use the `ntfy.publish` action instead of `notify.send_message`. With `ntfy.publish`, you can take full advantage of the **ntfy** service's capabilities. These include setting a priority, adding links, attachments, tags, and emojis.
110+
111+
#### Parameters
112+
113+
- `title`: Title for your notification message.
114+
- `message`: Your notification message.
115+
- `markdown`: Enable Markdown formatting for the message body (Web app only). See the Markdown guide for syntax details: [https://www.markdownguide.org/basic-syntax/](https://www.markdownguide.org/basic-syntax/).
116+
- `tags`: Add tags or emojis to the notification. Emojis (using shortcodes like `smile`) will appear in the notification title or message. Other tags will be displayed below the notification content.
117+
- `priority`: All messages have a priority, which defines how urgently your phone notifies you, depending on the configured vibration patterns, notification sounds, and visibility in the notification drawer or pop-over.
118+
- `click`: URL that is opened when the notification is clicked.
119+
- `delay`: Set a delay for message delivery. The minimum delay is 10 seconds, and the maximum delay is 3 days.
120+
- `attach`: Attach images or other files by URL.
121+
- `email`: Specify the address to forward the notification to, for example `[email protected]`.
122+
- `call`: Phone number to call and read the message out loud using text-to-speech. Requires ntfy Pro and prior phone number verification.
123+
- `icon`: Include an icon that will appear next to the text of the notification. Only JPEG and PNG images are supported.
124+
125+
{% details "Example YAML configuration" %}
126+
127+
{% raw %}
128+
129+
```yaml
130+
action: ntfy.publish
131+
data:
132+
title: "Server Alert"
133+
message: "CPU usage exceeded 90%."
134+
priority: "5"
135+
click: "https://homeassistant.local"
136+
tags:
137+
- rotating_light
138+
target:
139+
entity_id: notify.mytopic
140+
```
141+
142+
{% endraw %}
143+
144+
{% enddetails %}
145+
146+
{% note %}
147+
148+
All parameters are optional. If `message` is left empty, the notification will use the default text: `triggered`. If `priority` is not specified, the default priority (3) will be used.
149+
150+
{% endnote %}
151+
152+
{% tip %}
153+
154+
Check out the [emoji reference](https://docs.ntfy.sh/emojis/) for a full list of supported emoji shortcodes.
155+
156+
{% endtip %}
157+
105158
## Sensors
106159

107160
The **ntfy** integration adds a device representing the service, along with various sensors that display your usage statistics and current account limits.

0 commit comments

Comments
 (0)