-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
Document assist_satellite entity component #2304
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe changes introduce new documentation for the Assist satellite integration within the Home Assistant ecosystem. This includes details on the Changes
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 (
|
Please also include a small blog post that links to the new entity page, describing the new entity type that is being added. |
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
🧹 Outside diff range and nitpick comments (5)
docs/core/entity/assist-satellite.md (5)
10-17
: Enhance table readability with minor formatting adjustments.The properties table is informative, but its readability can be improved with some minor formatting changes:
- Add a blank line before and after the table for better separation.
- Align the pipe characters (|) in the table for a cleaner look.
Here's an example of how it could look:
## Properties | Name | Type | Default | Description | |---------------------------|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------| | `pipeline_entity_id` | `str | None` | `None` | Id of the `select` entity with the [pipeline id](/docs/voice/pipelines/) or `None`. | | `vad_sensitivity_entity_id` | `str | None` | `None` | Id of the `select` entity with the [voice activity detection sensitivity](https://github.com/home-assistant/core/blob/dev/homeassistant/components/assist_pipeline/vad.py) or `None`. | | `tts_options` | `dict | None` | `None` | Options passed to the [text-to-speech system](https://www.home-assistant.io/integrations/tts/) when responding. |These changes will make the table more visually appealing and easier to read.
19-32
: Approve States section with a minor language suggestion.The States section is well-structured and informative. The tip about calling the
tts_response_finished
method is valuable for developers. However, there's a minor language improvement that can be made:Consider rephrasing line 49 for clarity:
- The satellite entity's [state](#states) is automatically updated when a pipeline is run, with the exception of `RESPONDING` to `IDLE`. + The satellite entity's [state](#states) is automatically updated when a pipeline is run, except for the transition from `RESPONDING` to `IDLE`.This change makes the exception more explicit and easier to understand.
43-68
: Approve Methods section with a suggestion for improved structure.The Methods section provides comprehensive information about the various methods available for the AssistSatelliteEntity. The explanations are clear and informative. To improve readability, consider the following suggestion:
Add subheadings for each method to make it easier for developers to navigate the section. For example:
## Methods ### Running a pipeline and handling events [Existing content] ### Get configuration [Existing content] ### Set configuration [Existing content] ### Announcements [Existing content]This structure will make it easier for developers to quickly find information about specific methods.
🧰 Tools
🪛 LanguageTool
[style] ~49-~49: Consider using “except” or “except for”
Context: ...tically updated when a pipeline is run, with the exception ofRESPONDING
toIDLE
. The `tts_respon...(WITH_THE_EXCEPTION_OF)
70-137
: Approve WebSocket API section with suggestions for JSON formatting.The WebSocket API section provides comprehensive information about the available commands, including clear explanations and helpful JSON examples. To improve readability, consider the following suggestions:
- Use consistent indentation in JSON examples. Prefer 2 or 4 spaces for indentation.
- Add language identifiers to the code blocks for syntax highlighting.
For example, update the JSON examples like this:
{ "type": "assist_satellite/intercept_wake_word", "entity_id": "assist_satellite.living_room" }{ "wake_word_phrase": "okay nabu" }Apply similar formatting to the other JSON examples in this section. This will improve readability and make the examples more visually appealing.
139-152
: Enhance "Setting the active wake words" section with formatting and error handling information.The section provides clear information about using the WebSocket command to set active wake words. To further improve it, consider the following suggestions:
- Improve the formatting of the JSON example for consistency with previous examples:
{ "type": "assist_satellite/set_wake_words", "entity_id": "ENTITY_ID", "wake_word_ids": ["1234", "5678"] }
- Add a note about error handling:
Add information about how errors are handled if invalid wake word IDs are provided or if the number of IDs exceeds
max_active_wake_words
. For example:"If invalid wake word IDs are provided or if the number of IDs exceeds
max_active_wake_words
, the command will return an error response. Developers should handle these potential errors in their implementations."This additional information will help developers create more robust integrations with the Assist satellite entity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- docs/core/entity/assist-satellite.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/core/entity/assist-satellite.md
[style] ~49-~49: Consider using “except” or “except for”
Context: ...tically updated when a pipeline is run, with the exception ofRESPONDING
toIDLE
. The `tts_respon...(WITH_THE_EXCEPTION_OF)
🔇 Additional comments (3)
docs/core/entity/assist-satellite.md (3)
1-9
: LGTM: Header and introduction are well-structured.The metadata and introduction provide a clear overview of the Assist Satellite entity. The changes suggested in the past review have been correctly implemented.
34-41
: LGTM: Supported features section is comprehensive and well-explained.The Supported features section clearly describes how features are defined using the
AssistSatelliteEntityFeature
enum and how they can be combined. The detailed explanation of theANNOUNCE
feature provides valuable information for developers implementing this functionality.
1-152
: Excellent documentation with minor suggestions for improvement.Overall, this documentation for the Assist satellite entity is comprehensive, well-structured, and informative. It covers all the essential aspects of the entity, including properties, states, supported features, methods, and WebSocket API commands. The explanations are clear and provide valuable guidance for developers working with this entity.
The suggested improvements throughout the review are minor and mostly related to formatting and clarity. Implementing these suggestions will further enhance the readability and usability of the documentation.
Key points to address:
- Improve table formatting in the Properties section.
- Enhance the structure of the Methods section with subheadings.
- Consistently format JSON examples throughout the document.
- Add information about error handling for the "Setting the active wake words" command.
These improvements will make the documentation even more developer-friendly and easier to navigate. Great job on creating this detailed and helpful documentation for the Assist satellite entity!
🧰 Tools
🪛 LanguageTool
[style] ~49-~49: Consider using “except” or “except for”
Context: ...tically updated when a pipeline is run, with the exception ofRESPONDING
toIDLE
. The `tts_respon...(WITH_THE_EXCEPTION_OF)
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
🧹 Outside diff range and nitpick comments (3)
blog/2024-09-28-assist-satellite-entity.md (3)
11-11
: Use bold for UI strings.Replace the quotation marks with bold formatting for the entity name.
Apply this change:
-The new [`AssistSatelliteEntity`](/docs/core/entity/assist-satellite) provides an entity which represents a voice satellite. Its state follows the underlying Assist pipeline, allowing for easy automation. Additionally: +The new [**AssistSatelliteEntity**](/docs/core/entity/assist-satellite) provides an entity which represents a voice satellite. Its state follows the underlying Assist pipeline, allowing for easy automation. Additionally:
13-14
: Improve bullet list formatting.For better readability, add a space after the asterisks in the bullet list.
Apply these changes:
-* A new [announce action](https://home-assistant.io/integrations/assist_satellite#action-assist_satelliteannounce) is available for making announcements on supported devices. -* Several [websocket commands](/docs/core/entity/assist-satellite#websocket-api) are also available, providing a uniform way to get and set the active on-device wake words. +* A new [announce action](https://home-assistant.io/integrations/assist_satellite#action-assist_satelliteannounce) is available for making announcements on supported devices. +* Several [websocket commands](/docs/core/entity/assist-satellite#websocket-api) are also available, providing a uniform way to get and set the active on-device wake words.
6-6
: Use sentence-style capitalization in the title.Adjust the title to use sentence-style capitalization.
Apply this change:
-title: Introducing the Assist satellite entity +title: Introducing the Assist Satellite entity
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- blog/2024-09-28-assist-satellite-entity.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
blog/2024-09-28-assist-satellite-entity.md (6)
Pattern
*/**(html|markdown|md)
: - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
Pattern
*/**(html|markdown|md)
: - Use bold to mark UI strings.
- If "" are used to mark UI strings, replace them by bold.
Pattern
*/**(html|markdown|md)
: - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
Pattern
*/**(html|markdown|md)
: - Use sentence-style capitalization also in headings.
Pattern
*/**(html|markdown|md)
: do not comment on HTML used for icons
Pattern
*/**(html|markdown|md)
: Avoid flagging inline HTML for embedding videos in future reviews for this repository.
🔇 Additional comments (1)
blog/2024-09-28-assist-satellite-entity.md (1)
1-7
: Metadata looks good.The metadata section is well-structured and contains all necessary information.
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
🧹 Outside diff range and nitpick comments (5)
docs/core/entity/assist-satellite.md (5)
10-17
: LGTM: Properties are well-documented. Consider a minor improvement for consistency.The properties section provides clear and detailed information about each property of the Assist Satellite entity. The table format enhances readability.
For consistency, consider adding a link to the text-to-speech system documentation in the
tts_options
description, similar to how you've linked to other relevant docs:-| `tts_options` | <code>dict; None</code> | <code>None</code> | Options passed to the [text-to-speech system](https://www.home-assistant.io/integrations/tts/) when responding. | +| `tts_options` | <code>dict; None</code> | <code>None</code> | Options passed to the [text-to-speech system](/integrations/tts/) when responding. |
19-32
: LGTM: States are well-documented. Consider a minor clarification.The States section provides clear information about the possible states of an AssistSatelliteEntity. The tip about
tts_response_finished
is crucial for developers to understand state transitions.To improve clarity, consider adding a brief explanation of the
AssistSatelliteState
enum before listing the states. This will help developers understand how to use these states in their code. Add the following line before the table:The state of an `AssistSatelliteEntity` follows its currently running [pipeline](/docs/voice/pipelines/). The `AssistSatelliteState` enum stores the possible states. +The `AssistSatelliteState` enum can be imported from `homeassistant.components.assist_satellite` and used to compare against the entity's state. | Constant | Description |
34-41
: LGTM: Supported features are well-documented. Consider adding a note for future expansion.The Supported features section clearly explains how to use the
AssistSatelliteEntityFeature
enum and combine features. TheANNOUNCE
feature is well-documented with implementation details.To future-proof the documentation, consider adding a note about potential future features:
| Value | Description | |------------|---------------------------------------------------| | `ANNOUNCE` | Device supports remotely triggered announcements. Implement the `async_announce` method to play back the provided `media_id` from `AssistSatelliteAnnouncement`. This method should only return once the announcement has finished playing on the device. | +:::note +Additional features may be added in future versions of Home Assistant. Always refer to the latest documentation or the `AssistSatelliteEntityFeature` enum for the most up-to-date list of supported features. +:::
43-68
: LGTM: Methods are well-documented. Consider a minor improvement for consistency.The Methods section provides comprehensive information about various methods, their implementation requirements, and their relationship with entity states. The reference to the websocket API is helpful for developers who need more detailed information.
For consistency with other sections, consider adding a brief introduction to the Methods section:
## Methods +The following methods are essential for implementing and managing an Assist Satellite entity. Developers should pay close attention to the implementation requirements and state management aspects of each method. ### Running a pipeline and handling events🧰 Tools
🪛 LanguageTool
[style] ~49-~49: Consider using “except” or “except for”
Context: ...tically updated when a pipeline is run, with the exception ofRESPONDING
toIDLE
. The `tts_respon...(WITH_THE_EXCEPTION_OF)
70-152
: LGTM: WebSocket API is well-documented. Consider adding a note about error handling.The WebSocket API section provides comprehensive documentation for three commands, including clear JSON examples for requests and responses. The explanations offer sufficient detail for developers to implement and use these commands effectively.
To enhance the documentation, consider adding a note about error handling for these WebSocket commands. Add the following after the last command description:
### Error Handling When using these WebSocket API commands, be prepared to handle potential error responses. Common errors might include: - Invalid entity_id - Unsupported features - Configuration errors Always check the response for error messages and handle them appropriately in your implementation.This addition will help developers create more robust implementations when using the WebSocket API.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- docs/core/entity/assist-satellite.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/core/entity/assist-satellite.md
[style] ~49-~49: Consider using “except” or “except for”
Context: ...tically updated when a pipeline is run, with the exception ofRESPONDING
toIDLE
. The `tts_respon...(WITH_THE_EXCEPTION_OF)
🔇 Additional comments (2)
docs/core/entity/assist-satellite.md (2)
1-9
: LGTM: Header and introduction are well-structured and informative.The metadata and introduction provide a clear overview of the Assist Satellite entity and its purpose within the Home Assistant ecosystem.
49-49
: Style suggestion: Current phrasing is acceptable.The static analysis tool suggested replacing "with the exception of" with "except" or "except for". While this change would be valid, the current phrasing is clear and commonly used in technical documentation.
The current phrasing "with the exception of" is acceptable and doesn't hinder readability. No change is necessary unless consistency with other documentation is a concern.
🧰 Tools
🪛 LanguageTool
[style] ~49-~49: Consider using “except” or “except for”
Context: ...tically updated when a pipeline is run, with the exception ofRESPONDING
toIDLE
. The `tts_respon...(WITH_THE_EXCEPTION_OF)
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
🧹 Outside diff range and nitpick comments (3)
blog/2024-10-01-assist-satellite-entity.md (3)
9-10
: Use bold for UI element names.For consistency and clarity, use bold formatting for UI element names.
Apply this change:
-Users typically interact with [Assist](https://www.home-assistant.io/voice_control/) using remote voice satellites, such as the [ESP32-S3-BOX-3](https://www.home-assistant.io/voice_control/s3_box_voice_assistant/) running ESPHome, [analog phones](https://www.home-assistant.io/voice_control/worlds-most-private-voice-assistant/) running VoIP, and more. The integrations managing these satellites have used ad-hoc `binary_sensor` and `select` entities to allow users to configure the satellite's [pipeline](/docs/voice/pipelines/), automate based on the pipeline state, etc. +Users typically interact with [Assist](https://www.home-assistant.io/voice_control/) using remote voice satellites, such as the [ESP32-S3-BOX-3](https://www.home-assistant.io/voice_control/s3_box_voice_assistant/) running ESPHome, [analog phones](https://www.home-assistant.io/voice_control/worlds-most-private-voice-assistant/) running VoIP, and more. The integrations managing these satellites have used ad-hoc **binary_sensor** and **select** entities to allow users to configure the satellite's [pipeline](/docs/voice/pipelines/), automate based on the pipeline state, etc.
6-6
: Use sentence-style capitalization for the title.For consistency with the coding guidelines, use sentence-style capitalization in the title.
Apply this change:
-title: Introducing the Assist satellite entity +title: Introducing the Assist Satellite entity
11-11
: Improve clarity by rewording the sentence.To enhance clarity and directness, consider rewording the sentence.
Apply this change:
-The new [`AssistSatelliteEntity`](/docs/core/entity/assist-satellite) provides an entity which represents a voice satellite. Its state follows the underlying Assist pipeline, allowing for easy automation. Additionally: +The new [`AssistSatelliteEntity`](/docs/core/entity/assist-satellite) represents a voice satellite. Its state aligns with the underlying Assist pipeline, enabling easy automation. Key features include:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- blog/2024-10-01-assist-satellite-entity.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
blog/2024-10-01-assist-satellite-entity.md (6)
Pattern
*/**(html|markdown|md)
: - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.
- Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
- In step-by-step instructions, front the location phrase in the instructional sentence.
- In step-by-step instructions, front the 'goal' in the instructional sentence.
- In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
- do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'
Pattern
*/**(html|markdown|md)
: - Use bold to mark UI strings.
- If "" are used to mark UI strings, replace them by bold.
Pattern
*/**(html|markdown|md)
: - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"
Pattern
*/**(html|markdown|md)
: - Use sentence-style capitalization also in headings.
Pattern
*/**(html|markdown|md)
: do not comment on HTML used for icons
Pattern
*/**(html|markdown|md)
: Avoid flagging inline HTML for embedding videos in future reviews for this repository.
🔇 Additional comments (2)
blog/2024-10-01-assist-satellite-entity.md (2)
1-7
: Metadata section is well-structured and complete.The metadata provides comprehensive author information and a concise, descriptive title for the blog post.
9-16
: Content is informative and well-structured.The blog post effectively introduces the
AssistSatelliteEntity
, explaining its purpose, benefits, and key features. The writing is clear, concise, and follows the Microsoft Style Guide.
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.
Thanks!
Proposed change
Type of change
Additional information
Summary by CodeRabbit