Skip to content

Add light platform to qbus#136168

Merged
zweckj merged 7 commits intohome-assistant:devfrom
Qbus-iot:platform-light
Feb 20, 2025
Merged

Add light platform to qbus#136168
zweckj merged 7 commits intohome-assistant:devfrom
Qbus-iot:platform-light

Conversation

@thomasddn
Copy link
Copy Markdown
Contributor

@thomasddn thomasddn commented Jan 21, 2025

Proposed change

Add support for light platform to the qbus integration. Because of that, a function has been moved so it can be used by several platforms.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @Qbus-iot, mind taking a look at this pull request as it has been labeled with an integration (qbus) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of qbus can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign qbus Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@zweckj zweckj changed the title Add light platform Add light platform to qbus Jan 21, 2025
Copy link
Copy Markdown
Contributor

@davet2001 davet2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as my understanding goes, this looks good.

One question I had was whether Qbus dimmers have a separate on/off state as well as the dimmer state.

For example is setting dimmer to 0% the same as turning it off? For some integrations in those cases the dimmer is active but at a very low brightness which is usually not what people want (energy use, heat output, sometimes sound etc).

I looked at the QBus documentation for a short time but couldn't find this out either way.

Another way of asking is whether the QBusMqttOnOffState can be set for a dimmer. Do you know?

@thomasddn
Copy link
Copy Markdown
Contributor Author

Hi! We discussed this internally and you are actually right about on/off! Setting the value to 0% does turn the dimmer off. But using the on command will turn the dimmer on with the preconfigured value.

I'll update the code.

@thomasddn thomasddn marked this pull request as draft January 24, 2025 10:59
@thomasddn thomasddn marked this pull request as ready for review January 24, 2025 15:23
@thomasddn
Copy link
Copy Markdown
Contributor Author

Code has been updated

@thomasddn
Copy link
Copy Markdown
Contributor Author

Some voip test failed. Should I rebase the latest dev version?

@davet2001
Copy link
Copy Markdown
Contributor

As you say, the failure was unrelated. I just reran the test and it passed, so no need to rebase. Thanks!

Copy link
Copy Markdown
Contributor

@davet2001 davet2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Thanks @thomasddn!

@thomasddn
Copy link
Copy Markdown
Contributor Author

Just wondering, no pressure: am I supposed to do something or are we waiting until after the February release? Sorry, I'm not sure how this typically works.

@davet2001
Copy link
Copy Markdown
Contributor

@thomasddn nothing more needed from you, it's on us now!

I'll request a 2nd opinion before merging in case I missed something.

@davet2001 davet2001 added the second-opinion-wanted Add this label when a reviewer needs a second opinion from another member. label Jan 28, 2025
Comment thread homeassistant/components/qbus/light.py Outdated
Comment thread homeassistant/components/qbus/manifest.json
@home-assistant home-assistant Bot marked this pull request as draft January 29, 2025 10:43
@home-assistant
Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@thomasddn thomasddn mentioned this pull request Jan 29, 2025
19 tasks
@thomasddn thomasddn marked this pull request as ready for review January 29, 2025 11:19
@home-assistant home-assistant Bot requested a review from joostlek January 29, 2025 11:19
@thomasddn
Copy link
Copy Markdown
Contributor Author

Hi! A few things were changed after a second opinion review. Are we able to merge now?

Comment thread homeassistant/components/qbus/entity.py Outdated
Comment thread homeassistant/components/qbus/entity.py Outdated
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Feb 19, 2025
@zweckj zweckj merged commit 5d851b6 into home-assistant:dev Feb 20, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

by-code-owner cla-signed has-tests integration: qbus new-feature new-platform Quality Scale: bronze second-opinion-wanted Add this label when a reviewer needs a second opinion from another member. smash Indicator this PR is close to finish for merging or closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants