Skip to content

bosch_shc: create cover entities for micromodule shutters and blinds - #181416

Open
mosandlt wants to merge 1 commit into
home-assistant:devfrom
mosandlt:bosch-shc-micromodule-shutter-cover
Open

bosch_shc: create cover entities for micromodule shutters and blinds#181416
mosandlt wants to merge 1 commit into
home-assistant:devfrom
mosandlt:bosch-shc-micromodule-shutter-cover

Conversation

@mosandlt

@mosandlt mosandlt commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Proposed change

cover.py's async_setup_entry only ever enumerated session.device_helper.shutter_controls (the BBL model — Bosch's own wired shutter relay). Zigbee micromodule shutters/awnings (MICROMODULE_SHUTTER/MICROMODULE_AWNING) and blinds (MICROMODULE_BLINDS) were never enumerated at all, so those devices got no cover entity even though boschshcpy discovers and polls them correctly (#181407) — no errors, no missing dependency, just nothing iterating that bucket.

This adds:

  • micromodule_shutter_controls to the existing shutter enumeration, with a device_class that returns AWNING for MICROMODULE_AWNING and SHUTTER otherwise.
  • A new BlindsControlCover for micromodule_blinds, adding tilt support (current_angle/target_angle on top of the same lift level).
  • The matching gap in sensor.py: these device types also expose power/energy via a PowerMeter service, which was likewise never wired into _PowerMeterDevice.

No library version bump needed — boschshcpy 0.6.4 (already pinned) has supported these device models since 0.2.x.

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

  • I understand the code I am submitting and can explain how it works.
  • 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.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

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 diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

🤖 Generated with Claude Code

https://claude.ai/code/session_01W1XR86oNP5B49zG5obz7Cw

session.device_helper.shutter_controls only covers the BBL model. Zigbee
micromodule shutters/awnings (MICROMODULE_SHUTTER/MICROMODULE_AWNING) and
blinds (MICROMODULE_BLINDS) were never enumerated by cover.py, so devices
in those buckets got no entity at all even though boschshcpy discovers
and polls them fine (home-assistant#181407). Also add their power/energy sensors,
which sensor.py had the same gap for.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W1XR86oNP5B49zG5obz7Cw
@home-assistant

home-assistant Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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

Code owner commands

Code owners of bosch_shc can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant mark-draft Mark the pull request as draft.
  • @home-assistant ready-for-review Remove the draft status from the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign bosch_shc Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant update-branch Update the pull request branch with the base branch.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are narrowly scoped to enumerating previously-unhandled device buckets, include appropriate entity behavior, and add focused regression tests for the new functionality.

Pull request overview

Fixes missing Bosch SHC cover and power/energy sensor entities for Zigbee micromodule shutters/awnings/blinds by ensuring these device buckets are enumerated and exposed via the integration’s cover and sensor platforms.

Changes:

  • Extend cover.py entity setup to include micromodule_shutter_controls and add a new BlindsControlCover with tilt support for micromodule_blinds.
  • Extend sensor.py power/energy sensor setup to include micromodule shutter/blinds devices that expose PowerMeter.
  • Add targeted cover platform tests covering BBL shutters, micromodule shutter/awning device class selection, and micromodule blinds tilt behavior.
File summaries
File Description
homeassistant/components/bosch_shc/cover.py Enumerates micromodule shutter/blinds buckets and implements blinds tilt support.
homeassistant/components/bosch_shc/sensor.py Adds micromodule shutter/blinds devices to the power/energy sensor entity creation list.
tests/components/bosch_shc/conftest.py Extends mocked device buckets and adds helpers for shutter/blinds device doubles.
tests/components/bosch_shc/test_cover.py Adds regression tests for micromodule cover enumeration and tilt controls.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bosch SHC: Shutter Control devices received by boschshcpy but no cover entities are created

2 participants