From e90d506a2ca43ff10504142cc9518b5cacceed09 Mon Sep 17 00:00:00 2001 From: Dubh Ad Date: Sat, 20 Jul 2019 12:54:33 +0100 Subject: [PATCH] Converting JSON to YAML (#9927) Given that people use YAML, another old JSON approach converted to YAML. --- source/_components/discord.markdown | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/source/_components/discord.markdown b/source/_components/discord.markdown index 16f0ea7f283..b9f32559438 100644 --- a/source/_components/discord.markdown +++ b/source/_components/discord.markdown @@ -66,21 +66,15 @@ Right click channel name and copy the channel ID (**Copy ID**). This channel ID has to be used as the target when calling the notification service. Multiple channel IDs can be specified, across multiple servers. -#### Example service payload +#### Example service call -```json -{ - "message": "A message from Home Assistant", - "target": [ - "1234567890", - "0987654321" - ], - "data": { - "images": [ - "/tmp/garage_cam.jpg" - ] - } -} +```yaml +- service: notify.discord + data: + message from Home Assistant", + target: "1234567890", "0987654321" + data: + images: "/tmp/garage_cam" ``` ### Notes