mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
Add image attribute to html5 notify (#3596)
This commit is contained in:
parent
1c9e3f66c9
commit
843a97d1ba
@ -103,7 +103,7 @@ Chrome supports notification actions, which are configurable buttons that arrive
|
||||
|
||||
#### {% linkable_title Data %}
|
||||
|
||||
Any parameters that you pass in the notify payload that aren't valid for use in the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`) will be sent back to you in the [callback events](#automating-notification-events).
|
||||
Any parameters that you pass in the notify payload that aren't valid for use in the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `image`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`) will be sent back to you in the [callback events](#automating-notification-events).
|
||||
|
||||
```json
|
||||
{
|
||||
@ -193,13 +193,13 @@ During the lifespan of a single push notification, Home Assistant will emit a fe
|
||||
|
||||
Common event payload parameters are:
|
||||
|
||||
| Parameter | Description |
|
||||
|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `action` | The `action` key that you set when sending the notification of the action clicked. Only appears in the `clicked` event. |
|
||||
| `data` | The data dictionary you originally passed in the notify payload, minus any parameters that were added to the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`). |
|
||||
| `tag` | The unique identifier of the notification. Can be overridden when sending a notification to allow for replacing existing notifications. |
|
||||
| `target` | The target that this notification callback describes. |
|
||||
| `type` | The type of event callback received. Can be `received`, `clicked` or `closed`. |
|
||||
| Parameter | Description |
|
||||
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `action` | The `action` key that you set when sending the notification of the action clicked. Only appears in the `clicked` event. |
|
||||
| `data` | The data dictionary you originally passed in the notify payload, minus any parameters that were added to the HTML5 notification (`actions`, `badge`, `body`, `dir`, `icon`, `image`, `lang`, `renotify`, `requireInteraction`, `tag`, `timestamp`, `vibrate`). |
|
||||
| `tag` | The unique identifier of the notification. Can be overridden when sending a notification to allow for replacing existing notifications. |
|
||||
| `target` | The target that this notification callback describes. |
|
||||
| `type` | The type of event callback received. Can be `received`, `clicked` or `closed`. |
|
||||
|
||||
You can use the `target` parameter to write automations against a single `target`. For more granularity, use `action` and `target` together to write automations which will do specific things based on what target clicked an action.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user