-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
base: next
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 WalkthroughWalkthroughThe 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, two example automations demonstrating the use of Qbus scenes were added. No code or functional changes were made. Changes
Sequence Diagram(s)No sequence diagram generated as the changes are limited to documentation updates. 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.
### Extend Qbus scene | ||
|
||
You can extend a Qbus scene by adding other entities in an automation. | ||
In this example, a LED strip is turned on when the **Watching TV** Qbus scene is activated. | ||
|
||
Replace `scene.ctd_000001_watching_tv` with your Qbus scene entity and `light.tv_strip` with your light entity. | ||
|
||
{% raw %} | ||
|
||
```yaml | ||
alias: Extend "Watching TV" Qbus scene | ||
description: "" | ||
triggers: | ||
- trigger: state | ||
entity_id: | ||
- scene.ctd_000001_watching_tv | ||
conditions: [] | ||
actions: | ||
- action: light.turn_on | ||
metadata: {} | ||
data: | ||
rgb_color: | ||
- 255 | ||
- 187 | ||
- 0 | ||
brightness_pct: 40 | ||
target: | ||
entity_id: light.tv_strip | ||
mode: single | ||
``` | ||
|
||
{% 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 second automation example to use correct HA automation schema
Similarly, refactor the second example to use singular trigger:
and the action:
list with service:
. For example:
@@ triggers:
- triggers:
- - trigger: state
- entity_id:
- - scene.ctd_000001_watching_tv
+ trigger:
+ - platform: state
+ entity_id: scene.ctd_000001_watching_tv
@@ actions:
- actions:
- - action: light.turn_on
- metadata: {}
- data:
- rgb_color:
- - 255
- - 187
- - 0
- brightness_pct: 40
- target:
- entity_id: light.tv_strip
+ action:
+ - service: light.turn_on
+ target:
+ entity_id: light.tv_strip
+ data:
+ rgb_color: [255, 187, 0]
+ brightness_pct: 40
📝 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.
### Extend Qbus scene | |
You can extend a Qbus scene by adding other entities in an automation. | |
In this example, a LED strip is turned on when the **Watching TV** Qbus scene is activated. | |
Replace `scene.ctd_000001_watching_tv` with your Qbus scene entity and `light.tv_strip` with your light entity. | |
{% raw %} | |
```yaml | |
alias: Extend "Watching TV" Qbus scene | |
description: "" | |
triggers: | |
- trigger: state | |
entity_id: | |
- scene.ctd_000001_watching_tv | |
conditions: [] | |
actions: | |
- action: light.turn_on | |
metadata: {} | |
data: | |
rgb_color: | |
- 255 | |
- 187 | |
- 0 | |
brightness_pct: 40 | |
target: | |
entity_id: light.tv_strip | |
mode: single | |
``` | |
{% endraw %} |
## 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 👍
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