mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 04:46:49 +00:00
Add Matrix HTML format message documentation (#22372)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
4d550fd16f
commit
5f85c78d57
@ -183,6 +183,24 @@ The target room has to be precreated, the room id can be obtained from the rooms
|
||||
|
||||
To use notifications, please see the [getting started with automation page](/getting-started/automation/).
|
||||
|
||||
|
||||
### Message formats
|
||||
|
||||
Matrix supports sending messages using a [limited HTML subset](https://spec.matrix.org/v1.2/client-server-api/#mroommessage-msgtypes). To specify the message format, add it in the notification `data`.
|
||||
|
||||
Supported formats are: `text` (default), and `html`.
|
||||
|
||||
```yaml
|
||||
# Example of notification as HTML
|
||||
action:
|
||||
service: notify.matrix_notify
|
||||
data:
|
||||
message: >-
|
||||
<h1>Hello, world!</h1>
|
||||
data:
|
||||
format: "html"
|
||||
```
|
||||
|
||||
### Images in notification
|
||||
|
||||
It is possible to send images with notifications. To do so, add a list of paths in the notification `data`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user