Skip to content

feat: hub-based architecture for automatic shade discovery#29

Open
safepay wants to merge 19 commits intopatman15:mainfrom
safepay:hub-architecture
Open

feat: hub-based architecture for automatic shade discovery#29
safepay wants to merge 19 commits intopatman15:mainfrom
safepay:hub-architecture

Conversation

@safepay
Copy link
Copy Markdown

@safepay safepay commented Apr 9, 2026

What is this?

This PR takes a different approach to managing PowerView BLE shades. Instead of setting up each shade individually as its own config entry, this introduces a hub-based model where a single config entry represents your PowerView home and shades are discovered automatically via BLE.

This includes all the work from #25 and #28 which I have closed (but left the branches).

What this PR changes (hub-based)

You set up the integration once — point it at your hub (or enter the key manually) — and shades are automatically picked up as they're discovered over BLE. New shades appear without any additional config. Shade names are pulled from the hub so they match what you already see in the PowerView app.

The main changes:

  • __init__.py — manages a collection of coordinators (one per shade), registers a BLE callback to pick up new shades, and fetches friendly names from the hub API
  • config_flow.py — simplified to a single setup step: choose how to provide the home key (fetch from hub, enter manually, or skip)
  • Entity platforms — use a dispatcher pattern so entities are created for both existing and newly-discovered shades
  • Velocity — adds velocity control for shades that support it via number.py
  • Shade Capability Detection — adds detection for all shade types
  • Top Down Shades — adds support for Top Down Shade types
  • Addresses Add type 54 vertical blinds support (position + tilt) + fix battery_charging bug & possible guide for adding other shade types included #27
  • Fixes the bit addressing that PR Feature/type 8 #16 was trying to fix without breaking other shades
  • Tilt on Closed Shades — adds support for Tilt on Closed Shade types

Why I think this is the better path

  • Zero-touch — add a shade to your home and it shows up in HA on its own
  • One config entry instead of one per shade
  • Names stay in sync with the PowerView app
  • Simpler setup — no multi-step shade picker, just provide the key and go
  • Scales naturally — 3 shades or 30 shades, same amount of setup

Closes #3
Closes #8
Closes #21
Closes #27

safepay added 16 commits April 6, 2026 09:07
Reuse the home key from already-configured shades so adding subsequent
shades skips the key step. Show human-readable shade names from the hub
in the device picker. Allow selecting multiple shades at once instead of
repeating the flow for each one. Default to hub fetch as the key method.
Add ShadeCapability lookup to replace hardcoded model string checks for
tilt/tilt-only selection. Add velocity number entity (0–100) and pass
velocity through all movement paths including open/close. Remove
redundant device_info property overrides and deduplicate hex parsing.
@safepay
Copy link
Copy Markdown
Author

safepay commented Apr 11, 2026

Sorry about the monster PR, but this brings the integration in line with modern HA architecture and should work with most blinds except the ones that have multiple blinds.

Thanks for a great integration. My setup is working perfectly. But I don't own all the blinds so I can't test everything.

At least it has the necessary information to move to the next step regarding dual and triple blind support, but that requires a bit of a refactor.

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

Labels

None yet

Projects

None yet

1 participant