Skip to content

Commit 41f0b32

Browse files
HugoGressefrenck
authored andcommitted
Format json response in notify.telegram.markdown (home-assistant#3658)
1 parent 6b62c56 commit 41f0b32

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

source/_components/notify.telegram.markdown

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,30 @@ The quickest way to retrieve your `chat_id` is visiting [https://api.telegram.or
2828
The result set will include your chat ID as `id` in the `from` section:
2929

3030
```json
31-
{"ok":true,"result":[{"update_id":254199982,
32-
"message":{"message_id":27,"from":{"id":123456789,"first_name":"YOUR_FIRST_NAME YOUR_NICK_NAME","last_name":"YOUR_LAST_NAME","username":"YOUR_NICK_NAME"},"chat":{"id":123456789,"first_name":"YOUR_FIRST_NAME YOUR_NICK_NAME","last_name":"YOUR_LAST_NAME","username":"YOUR_NICK_NAME","type":"private"},"date":1678292650,"text":"test"}}]}
31+
{
32+
"ok": true,
33+
"result": [{
34+
"update_id": 254199982,
35+
"message": {
36+
"message_id": 27,
37+
"from": {
38+
"id": 123456789,
39+
"first_name": "YOUR_FIRST_NAME YOUR_NICK_NAME",
40+
"last_name": "YOUR_LAST_NAME",
41+
"username": "YOUR_NICK_NAME"
42+
},
43+
"chat": {
44+
"id": 123456789,
45+
"first_name": "YOUR_FIRST_NAME YOUR_NICK_NAME",
46+
"last_name": "YOUR_LAST_NAME",
47+
"username": "YOUR_NICK_NAME",
48+
"type": "private"
49+
},
50+
"date": 1678292650,
51+
"text": "test"
52+
}
53+
}]
54+
}
3355
```
3456

3557
Another way to get your chat ID directly is described below. Start your Python interpreter from the command-line:

0 commit comments

Comments
 (0)