Notify: add state (#34693)

This commit is contained in:
c0ffeeca7 2024-09-12 08:52:25 +02:00 committed by GitHub
parent 4cc02a6cfd
commit edc023f45a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 10 deletions

View File

@ -17,16 +17,25 @@ If you want to send notifications to the Home Assistant web interface, you may u
{% include integrations/building_block_integration.md %}
## The state of a notify entity
The state of a notify entity is the date and time when a message was last sent.
<p class='img'>
<img src='/images/integrations/notify/state_notify.png' alt='Screenshot showing the state of a notify entity in the developer tools' />
Screenshot showing the state of a notify entity in the developer tools.
</p>
## Action
The legacy `notify` platform will expose a generic `notify` action that can be called to send notifications.
| Data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `message` | no | Body of the notification.
| `title` | yes | Title of the notification.
| `target` | yes | Some platforms allow specifying a recipient that will receive the notification. See your platform page if it is supported.
| `data` | yes | On platforms who have extended functionality. See your platform page if it is supported.
| Data attribute | Optional | Description |
| -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
| `message` | no | Body of the notification. |
| `title` | yes | Title of the notification. |
| `target` | yes | Some platforms allow specifying a recipient that will receive the notification. See your platform page if it is supported. |
| `data` | yes | On platforms who have extended functionality. See your platform page if it is supported. |
## Usage
@ -38,10 +47,10 @@ One notification integration is automatically included, the Persistent Notificat
Integrations can also implement the notify entity platform. Entity platform implementations will replace the legacy notify action in time. There is an entity platform action `send_message` which allows you to send notification messages to multiple notify entities.
| Data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `message` | no | Body of the notification.
| `title` | yes | Title of the notification.
| Data attribute | Optional | Description |
| -------------- | -------- | -------------------------- |
| `message` | no | Body of the notification. |
| `title` | yes | Title of the notification. |
## Companion app notifications

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB