Skip to content

Commit c1e7492

Browse files
authored
Improve action descriptions for Telegram bot (home-assistant#158022)
1 parent 63e8cf5 commit c1e7492

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

homeassistant/components/telegram_bot/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,9 @@ async def async_send_telegram_message(service: ServiceCall) -> ServiceResponse:
524524
async_send_telegram_message,
525525
schema=schema,
526526
supports_response=supports_response,
527+
description_placeholders={
528+
"formatting_options_url": "https://core.telegram.org/bots/api#formatting-options"
529+
},
527530
)
528531

529532
return True

homeassistant/components/telegram_bot/strings.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
"name": "[%key:component::telegram_bot::services::send_photo::fields::authentication::name%]"
401401
},
402402
"caption": {
403-
"description": "The title of the media.",
403+
"description": "[%key:component::telegram_bot::services::send_photo::fields::caption::description%]",
404404
"name": "[%key:component::telegram_bot::services::send_photo::fields::caption::name%]"
405405
},
406406
"chat_id": {
@@ -499,7 +499,7 @@
499499
"name": "[%key:component::telegram_bot::services::send_photo::fields::authentication::name%]"
500500
},
501501
"caption": {
502-
"description": "The title of the animation.",
502+
"description": "[%key:component::telegram_bot::services::send_photo::fields::caption::description%]",
503503
"name": "[%key:component::telegram_bot::services::send_photo::fields::caption::name%]"
504504
},
505505
"config_entry_id": {
@@ -600,7 +600,7 @@
600600
"name": "[%key:component::telegram_bot::services::send_photo::fields::authentication::name%]"
601601
},
602602
"caption": {
603-
"description": "The title of the document.",
603+
"description": "[%key:component::telegram_bot::services::send_photo::fields::caption::description%]",
604604
"name": "[%key:component::telegram_bot::services::send_photo::fields::caption::name%]"
605605
},
606606
"config_entry_id": {
@@ -745,7 +745,7 @@
745745
"name": "Keyboard"
746746
},
747747
"message": {
748-
"description": "Message body of the notification.",
748+
"description": "Message body of the notification.\nCan't parse entities? Format your message according to the [formatting options]({formatting_options_url}).",
749749
"name": "Message"
750750
},
751751
"message_tag": {
@@ -757,7 +757,7 @@
757757
"name": "Message thread ID"
758758
},
759759
"parse_mode": {
760-
"description": "Parser for the message text.",
760+
"description": "Parser for the message text.\nSee [formatting options]({formatting_options_url}) for more details.",
761761
"name": "Parse mode"
762762
},
763763
"reply_to_message_id": {
@@ -787,7 +787,7 @@
787787
"name": "Authentication method"
788788
},
789789
"caption": {
790-
"description": "The title of the image.",
790+
"description": "The title of the media.\nCan't parse entities? Format your message according to the [formatting options]({formatting_options_url}).",
791791
"name": "Caption"
792792
},
793793
"config_entry_id": {
@@ -991,7 +991,7 @@
991991
"name": "[%key:component::telegram_bot::services::send_photo::fields::authentication::name%]"
992992
},
993993
"caption": {
994-
"description": "The title of the video.",
994+
"description": "[%key:component::telegram_bot::services::send_photo::fields::caption::description%]",
995995
"name": "[%key:component::telegram_bot::services::send_photo::fields::caption::name%]"
996996
},
997997
"config_entry_id": {
@@ -1070,7 +1070,7 @@
10701070
"name": "[%key:component::telegram_bot::services::send_photo::fields::authentication::name%]"
10711071
},
10721072
"caption": {
1073-
"description": "The title of the voice message.",
1073+
"description": "[%key:component::telegram_bot::services::send_photo::fields::caption::description%]",
10741074
"name": "[%key:component::telegram_bot::services::send_photo::fields::caption::name%]"
10751075
},
10761076
"config_entry_id": {

0 commit comments

Comments
 (0)