-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Add documentation for action buttons in ntfy integration #40799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tr4nt0r
wants to merge
2
commits into
home-assistant:next
Choose a base branch
from
tr4nt0r:ntfy_action_buttons
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+40
−0
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 `[email protected]`. | ||
| - `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 <!-- textlint-disable -->**'http'**<!-- textlint-enable --> 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" | ||
tr4nt0r marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| url: "https://grafana.example.com/d/server-overview" | ||
| clear: true | ||
| position: 3 | ||
| target: | ||
| entity_id: notify.mytopic | ||
| ``` | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.