From 4625ec59161cc3070caa9b11acb7b8a438b24b51 Mon Sep 17 00:00:00 2001 From: tr4nt0r <4445816+tr4nt0r@users.noreply.github.com> Date: Wed, 10 Sep 2025 04:52:35 +0200 Subject: [PATCH 1/2] Add documentation for action buttons in ntfy integration --- source/_integrations/ntfy.markdown | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/source/_integrations/ntfy.markdown b/source/_integrations/ntfy.markdown index 1dd909d4c177..9e0dd726fbdc 100644 --- a/source/_integrations/ntfy.markdown +++ b/source/_integrations/ntfy.markdown @@ -121,6 +121,25 @@ For more customizable notifications, use the `ntfy.publish` action instead of `n - `email`: Specify the address to forward the notification to, for example `mail@example.com`. - `call`: Phone number to call and read the message out loud using text-to-speech. Requires ntfy Pro and prior phone number verification. - `icon`: Include an icon that will appear next to the text of the notification. Only JPEG and PNG images are supported. +- `view`: Add **'view'** button actions that open a website or app when the action button is tapped. + - `label`: Label of the view action button in the notification. + - `url`: URL to open when action is tapped. + - `clear`: Clear notification after action button is tapped. + - `position`: The order of the buttons. Used when defining different action types. +- `broadcast`: Add **'broadcast'** button actions that sends an Android broadcast intent when the action button is tapped. + - `label`: Label of the broadcast action button in the notification. + - `intent`: Android intent name, default is `io.heckel.ntfy.USER_ACTION` + - `extras`: Android intent extras (key-value pairs). + - `clear`: Clear notification after action button is tapped + - `position`: The order of the buttons. Used when defining different action types. +- `http`: Add **'http'** button actions that sends an Android broadcast intent when the action button is tapped. + - `label`: Label of the broadcast action button in the notification. + - `url`: URL to which the HTTP request will be sent. + - `method`: HTTP method to use for request, default is `POST` + - `headers`: HTTP headers to pass in request (key-value pairs). + - `body`: Payload to send in the HTTP body. + - `clear`: Clear notification after action button is tapped. + - `position`: The order of the buttons. Used when defining different action types. {% details "Example YAML configuration" %} @@ -135,6 +154,27 @@ data: click: "https://homeassistant.local" tags: - rotating_light + http: + - label: Throttle server load + url: https://api.example.com/ + method: POST + headers: + x-client: HomeAssistant + Authorization: "Bearer zAzsx1sk.." + body: "{\"action\": \"throttle\"}" + position: 1 + broadcast: + - label: Set early alarm + intent: com.urbandroid.sleep.alarmclock.ALARM_STATE_CHANGE + extras: + alarm_label: Work emergency + alarm_enabled: true + position: 2 + view: + - label: "Open Server Dashboard" + url: "https://grafana.example.com/d/server-overview" + clear: true + position: 3 target: entity_id: notify.mytopic ``` From bdd51d1fdee825561cdda3205c0b06b2d7d5a398 Mon Sep 17 00:00:00 2001 From: tr4nt0r <4445816+tr4nt0r@users.noreply.github.com> Date: Wed, 10 Sep 2025 19:38:50 +0200 Subject: [PATCH 2/2] changes --- source/_integrations/ntfy.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/_integrations/ntfy.markdown b/source/_integrations/ntfy.markdown index 9e0dd726fbdc..0a09c6cc5237 100644 --- a/source/_integrations/ntfy.markdown +++ b/source/_integrations/ntfy.markdown @@ -121,18 +121,18 @@ For more customizable notifications, use the `ntfy.publish` action instead of `n - `email`: Specify the address to forward the notification to, for example `mail@example.com`. - `call`: Phone number to call and read the message out loud using text-to-speech. Requires ntfy Pro and prior phone number verification. - `icon`: Include an icon that will appear next to the text of the notification. Only JPEG and PNG images are supported. -- `view`: Add **'view'** button actions that open a website or app when the action button is tapped. +- `view`: Add **view** button actions that open a website or app when the action button is tapped. - `label`: Label of the view action button in the notification. - `url`: URL to open when action is tapped. - `clear`: Clear notification after action button is tapped. - `position`: The order of the buttons. Used when defining different action types. -- `broadcast`: Add **'broadcast'** button actions that sends an Android broadcast intent when the action button is tapped. +- `broadcast`: Add **broadcast** button actions that sends an Android broadcast intent when the action button is tapped. - `label`: Label of the broadcast action button in the notification. - `intent`: Android intent name, default is `io.heckel.ntfy.USER_ACTION` - `extras`: Android intent extras (key-value pairs). - `clear`: Clear notification after action button is tapped - `position`: The order of the buttons. Used when defining different action types. -- `http`: Add **'http'** button actions that sends an Android broadcast intent when the action button is tapped. +- `http`: Add **http** button actions that sends an Android broadcast intent when the action button is tapped. - `label`: Label of the broadcast action button in the notification. - `url`: URL to which the HTTP request will be sent. - `method`: HTTP method to use for request, default is `POST` @@ -171,7 +171,7 @@ data: alarm_enabled: true position: 2 view: - - label: "Open Server Dashboard" + - label: "Open server dashboard" url: "https://grafana.example.com/d/server-overview" clear: true position: 3