bosch_shc: create cover entities for micromodule shutters and blinds - #181416
bosch_shc: create cover entities for micromodule shutters and blinds#181416mosandlt wants to merge 1 commit into
Conversation
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
|
Hey there @tschamm, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
🟢 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.pyentity setup to includemicromodule_shutter_controlsand add a newBlindsControlCoverwith tilt support formicromodule_blinds. - Extend
sensor.pypower/energy sensor setup to include micromodule shutter/blinds devices that exposePowerMeter. - 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.
Proposed change
cover.py'sasync_setup_entryonly ever enumeratedsession.device_helper.shutter_controls(theBBLmodel — 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 thoughboschshcpydiscovers and polls them correctly (#181407) — no errors, no missing dependency, just nothing iterating that bucket.This adds:
micromodule_shutter_controlsto the existing shutter enumeration, with adevice_classthat returnsAWNINGforMICROMODULE_AWNINGandSHUTTERotherwise.BlindsControlCoverformicromodule_blinds, adding tilt support (current_angle/target_angleon top of the same liftlevel).sensor.py: these device types also expose power/energy via aPowerMeterservice, which was likewise never wired into_PowerMeterDevice.No library version bump needed —
boschshcpy0.6.4 (already pinned) has supported these device models since0.2.x.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests:
🤖 Generated with Claude Code
https://claude.ai/code/session_01W1XR86oNP5B49zG5obz7Cw