-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Add scene platform to Qbus integration #38836
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
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 Walkthrough""" WalkthroughThe documentation for the Qbus integration was updated to reflect support for the "Scene" entity type. The list of supported Home Assistant categories and platforms now includes "Scene," and the "Available entities" section describes the functionality of the "Scene" entity. The documentation also removes references to "Toggle" and "Dimmer" device types under supported devices. Additionally, an example automation demonstrating the use of Qbus scenes was added. No code or functional changes were made. Changes
Sequence Diagram(s)No sequence diagram generated as the changes are limited to documentation updates. Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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: 0
🧹 Nitpick comments (1)
source/_integrations/qbus.markdown (1)
50-50
: Enhance description for Scene entity.
The entry “activates scenes” is accurate but brief—consider expanding it with a short example or clarifying that this entity triggers predefined Qbus scenes within Home Assistant.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/qbus.markdown
(2 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
🔇 Additional comments (2)
source/_integrations/qbus.markdown (2)
7-7
: Add Scene to integration categories.
The new “Scene” category is correctly inserted in alphabetical order underha_category
to reflect the feature addition.
12-12
: Add scene platform to supported platforms.
Lowercasescene
aligns with Home Assistant’s platform naming conventions underha_platforms
. Ensure any downstream examples or schema validations include this new platform.
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/qbus.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
🔇 Additional comments (2)
source/_integrations/qbus.markdown (2)
7-12
: Scene added to integration metadata
The newha_category
entry- Scene
andha_platforms
entry- scene
correctly document the Scene platform support. The entries are in alphabetical order and comply with the front matter schema.
48-52
: Document Scene entity in Available entities
The- **Scene**: activates predefined scenes
entry accurately describes the new Scene entity. This aligns well with the new feature and follows the existing style.
## Examples | ||
|
||
### Automation to activate Qbus scene | ||
|
||
This automation will activate the **Watching TV** Qbus scene when turning on your TV. | ||
|
||
Replace `media_player.my_tv` with your TV entity and `scene.ctd_000001_watching_tv` with your Qbus scene entity. | ||
|
||
{% raw %} | ||
|
||
```yaml | ||
alias: Activate TV scene when turning on TV | ||
description: "" | ||
mode: single | ||
triggers: | ||
- entity_id: | ||
- media_player.my_tv | ||
from: "off" | ||
to: "on" | ||
trigger: state | ||
conditions: [] | ||
actions: | ||
- target: | ||
entity_id: scene.ctd_000001_watching_tv | ||
metadata: {} | ||
alias: Activate TV scene | ||
action: scene.turn_on | ||
data: {} | ||
``` | ||
|
||
{% endraw %} |
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
Update first automation example to use correct HA automation schema
The example should use singular trigger:
with platform: state
and to:
fields, and the action:
list should use service:
rather than action:
.
Here’s a diff for the first example:
@@ triggers:
- triggers:
- - entity_id:
- - media_player.my_tv
- from: "off"
- to: "on"
- trigger: state
+ trigger:
+ - platform: state
+ entity_id: media_player.my_tv
+ to: 'on'
@@ conditions: []
- conditions: []
+ condition: []
@@ actions:
- actions:
- - target:
- entity_id: scene.ctd_000001_watching_tv
- metadata: {}
- alias: Activate TV scene
- action: scene.turn_on
- data: {}
+ action:
+ - service: scene.turn_on
+ target:
+ entity_id: scene.ctd_000001_watching_tv
+ data: {}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
## Examples | |
### Automation to activate Qbus scene | |
This automation will activate the **Watching TV** Qbus scene when turning on your TV. | |
Replace `media_player.my_tv` with your TV entity and `scene.ctd_000001_watching_tv` with your Qbus scene entity. | |
{% raw %} | |
```yaml | |
alias: Activate TV scene when turning on TV | |
description: "" | |
mode: single | |
triggers: | |
- entity_id: | |
- media_player.my_tv | |
from: "off" | |
to: "on" | |
trigger: state | |
conditions: [] | |
actions: | |
- target: | |
entity_id: scene.ctd_000001_watching_tv | |
metadata: {} | |
alias: Activate TV scene | |
action: scene.turn_on | |
data: {} | |
``` | |
{% endraw %} | |
alias: Activate TV scene when turning on TV | |
description: "" | |
mode: single | |
trigger: | |
- platform: state | |
entity_id: media_player.my_tv | |
to: 'on' | |
condition: [] | |
action: | |
- service: scene.turn_on | |
target: | |
entity_id: scene.ctd_000001_watching_tv | |
data: {} |
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, @thomasddn 👍
Hi @c0ffeeca7! Due to a comment on the code PR I had to remove an example from the documentation. |
Proposed change
Adds documentation for the scene platform.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit