-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add documentation for message_thread_id data attribute for telegram notify integration #37381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It seems that this PR is targeted against an incorrect branch since it has a parent PR on one of our codebases. Documentation that needs to be updated for an upcoming release should target the |
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 WalkthroughWalkthroughThe changes update documentation for Telegram integrations by introducing a new optional configuration option, Changes
Sequence Diagram(s)sequenceDiagram
participant HA as Home Assistant
participant TB as Telegram Bot API
participant TG as Telegram
HA->>TB: send_message(data with message_thread_id)
TB->>TG: process message with specified thread ID
TG-->>TB: confirm message delivery
TB-->>HA: return delivery confirmation
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
source/_integrations/telegram.markdown
(2 hunks)source/_integrations/telegram_bot.markdown
(2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/telegram_bot.markdown
614-614: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - home-assistant-docs
- GitHub Check: Header rules - home-assistant-docs
- GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (4)
source/_integrations/telegram.markdown (1)
457-457
: New Example for message_thread_id Added
The new example in the “Extra data attributes support” section (line 457) clearly demonstrates the usage of the new “message_thread_id” parameter. Please ensure that the example’s type and default handling are consistent with the overall integration documentation.source/_integrations/telegram_bot.markdown (3)
41-43
: Inclusion of message_thread_id in Data Attribute Tables
The addition of the “message_thread_id” row to the data attribute tables for actions (e.g. in the “send_message” table) is well integrated. This new optional attribute is clearly described as sending the message to a specific topic or thread. Ensure consistency in wording across all action descriptions.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
43-43: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe(MD055, table-pipe-style)
293-296
: Clarification of Notification Platform Support
The sentence explaining that the [telegram
notification platform] requires thetelegram_bot
integration—and that it supports attributes includingmessage_thread_id
—provides clear context for users. This clarification helps link the functionality between integrations.
616-624
: New Example Code Block for message_thread_id
The new YAML example (lines 616–624) clearly demonstrates how to send a message to a specific topic using the “message_thread_id” attribute. The code is well indented and self-explanatory. Consider adding a brief inline comment to highlight that this attribute is optional and specifically intended for multi‑threaded group chats.
@@ -611,6 +611,17 @@ actions: | |||
disable_web_page_preview: true | |||
``` | |||
|
|||
## Example: send_message to a topic within a group: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Heading Punctuation Issue
The heading “## Example: send_message to a topic within a group:” ends with a colon, which violates the markdown lint rule MD026 (no-trailing-punctuation in headings). Please remove the trailing colon for consistency with documentation style guidelines.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
614-614: Trailing punctuation in heading
Punctuation: ':'
(MD026, no-trailing-punctuation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @calebmah 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
source/_integrations/telegram_bot.markdown (2)
293-293
: Enhanced Telegram Notification Platform Overview:
The updated paragraph now clearly listsmessage_thread_id
amongst the supported data attributes. This ensures that users are aware of its availability for sending messages to specific topics or threads. Consider mentioning that the value should be provided as an integer (if that’s what the Telegram API expects) to give users an extra hint about correct usage.
614-623
: Clear and Concise Example formessage_thread_id
:
The new YAML example effectively demonstrates sending a message to a specific topic by using themessage_thread_id
field. The configuration is clear and well-formatted, and it nicely illustrates how to embed the attribute within the nested data section. Optionally, you might add a short note either in the example or in the table (if supported in your documentation style) to state that themessage_thread_id
should be an integer corresponding to the target thread.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/telegram_bot.markdown
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - home-assistant-docs
- GitHub Check: Header rules - home-assistant-docs
- GitHub Check: Pages changed - home-assistant-docs
Proposed change
Add documentation and examples for message_thread_id data attribute for telegram notify integration
Support for message_thread_id as a data attribute was added in home-assistant/core#112715, but not mentioned in the documentation update #29857
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit