mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
Format json response in notify.telegram.markdown (#3658)
This commit is contained in:
parent
6b62c56717
commit
41f0b329fe
@ -28,8 +28,30 @@ The quickest way to retrieve your `chat_id` is visiting [https://api.telegram.or
|
|||||||
The result set will include your chat ID as `id` in the `from` section:
|
The result set will include your chat ID as `id` in the `from` section:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{"ok":true,"result":[{"update_id":254199982,
|
{
|
||||||
"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"}}]}
|
"ok": true,
|
||||||
|
"result": [{
|
||||||
|
"update_id": 254199982,
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Another way to get your chat ID directly is described below. Start your Python interpreter from the command-line:
|
Another way to get your chat ID directly is described below. Start your Python interpreter from the command-line:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user