Add notification with images example (#13943)

Co-authored-by: Franck Nijhof <frenck@frenck.dev>
This commit is contained in:
bestlibre 2021-03-19 22:08:52 +01:00 committed by GitHub
parent 5dd8aea9b0
commit ed3cfd0621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,3 +175,18 @@ default_room:
The target room has to be precreated, the room id can be obtained from the rooms settings dialog. Rooms by default have a canonical id of the form `"!<randomid>:homeserver.tld"`, but can also be allocated aliases like `"#roomname:homeserver.tld"`. Make sure to use quotes around the room id or alias to escape special characters (`!`, and `#`) in YAML. The notifying account may need to be invited to the room, depending on the individual rooms policies. The target room has to be precreated, the room id can be obtained from the rooms settings dialog. Rooms by default have a canonical id of the form `"!<randomid>:homeserver.tld"`, but can also be allocated aliases like `"#roomname:homeserver.tld"`. Make sure to use quotes around the room id or alias to escape special characters (`!`, and `#`) in YAML. The notifying account may need to be invited to the room, depending on the individual rooms policies.
To use notifications, please see the [getting started with automation page](/getting-started/automation/). To use notifications, please see the [getting started with automation page](/getting-started/automation/).
### Images in notification
It is possible to send images with notifications. To do so, add a list of paths in the notification `data`.
```yaml
# Example of notification with images
action:
service: notify.matrix_notify
data:
message: "Test with images"
data:
images:
- /path/to/picture.jpg
```