Most smart motorized shades (whether Z-Wave, Zigbee, Matter, Somfy, Tuya, or ESPHome) come with frustrating limitations out of the box:
- Missing Tilt Controls: Blinds with motorized tilt often only expose
open_tiltor raw tilt position attributes that cannot be operated like normal covers from dashboards or voice assistants. - Dumb Static Schedules: Closing shades at fixed hours fails as the sun's trajectory shifts across seasons.
- Inaccurate or Broken Battery Reporting: Lithium batteries discharge along a curve that confuses uncalibrated firmwareβoften dropping to 50% in two weeks, staying there for months, or abruptly dying at 30%. In addition, voltage sag during active motor movement triggers false "low battery" alarms.
- Orphaned Entities: Helper entities often clutter Home Assistant as separate virtual devices rather than living on the physical shade's device card.
Shade Complete solves all of this in one elegant, cohesive integration.
-
Window Orientation & Field of View: Configure your window's facing direction (N, NE, E, SE, S, SW, W, NW or custom degrees 0β360Β°) with customizable azimuth tolerance (half-angle FOV) and clean
$360^\circ$ North wraparound. -
Solar Elevation Mapping: Seamlessly interpolates between your low elevation cutoff (e.g.
$5^\circ$ ) and high elevation threshold (e.g.$40^\circ$ ) to dynamically keep direct glare out while preserving ambient daylight. -
Overcast & Storm Suppression: Monitors an optional
weather.*entity to suppress tracking on cloudy, foggy, or rainy days, automatically opening shades to maximize natural light. - Arbitrated Manual Overrides: If a user physically adjusts a shade or any member shade in a group via a wall remote or dashboard, Shade Complete yields immediately, detects the override, and automatically resumes tracking after a configurable timeout (or at sunset).
- Travel Verification: Automatically monitors movement duration; if motion is halted or intercepted before arrival, manual override is flagged instantly.
- Group Solar Tracking: Synchronized groups can follow the same sun-tracking geometry, coordinating multiple physical shades smoothly.
- Automatic Cover Entity Creation: When configuring a smart shade whose underlying physical device supports tilt (or when tilt interception is enabled), Shade Complete automatically provisions both the main
SmartTrackingShadeCoverand a co-locatedTiltCoverEntitydirectly on the physical device's card. - Seamless Low-Percentage Tilt Interception: Ever wanted to slightly tilt your blinds open using a single slider without lifting the shade roller? Enable Low-Percentage Tilt Interception (threshold 1β5%, configurable up to 15%). Commands in the 1β5% range are automatically converted into 0β100% slat tilt adjustments (
set_cover_tilt_position), while commands above the threshold adjust the shade height normally. - Native Device Card Binding: Inspects the Home Assistant Device Registry and binds helper entities directly to the physical shade's device card (
DeviceInfo). Your tilt controls, sun tracking entities, and battery sensors live right beside the physical hardware!
- Configurable per Shade or Group: Set automated daily routines for opening and closing.
- Flexible Trigger Modes:
- Clock Time: e.g., Open at
07:30:00to 100% (or custom target position), close at21:30:00. - Solar Event (Sunrise / Sunset): Open with a configurable offset from sunrise; close with an offset from sunset.
- Clock Time: e.g., Open at
- Re-Arming Daily Locks: Prevents redundant triggers throughout the day while automatically resetting manual overrides overnight.
- Motor-Sag Rejection: Voltage temporarily plunges when a motorized shade draws inrush current. Shade Complete inhibits calibration sampling during active motor motion, eliminating false low-battery alerts.
- Exponential Moving Average (EMA): Smooths sensor noise without lag.
- Online Bounds Learning: Observes your battery's actual low-voltage cutoff point and full-charge peak over time, dynamically calibrating the true 0β100% scale for your specific hardware.
- Charging Detection: Automatically detects when the shade is plugged into a solar or USB charger and isolates charging peaks from discharge curves.
- Low Battery Diagnostics & Alert Blueprint: Ships with a ready-to-use Home Assistant automation blueprint (
blueprints/automation/spelech/shade_low_battery_notification.yaml) alerting you when any shade falls below its critical battery threshold.
- Group multiple individual shades or tilt entities into a single unified cover.
- Concurrent command execution via
asyncio.gatherfor synchronized group movement and tilt positioning. - Computes true average position across all member shades.
- Supports group-level solar tracking, scheduled open/close routines, and member override detection.
Shade Complete integrates seamlessly into Lovelace. You can use the template below (also available in examples/dashboard_card.yaml) for an all-in-one card combining shade position, tilt slider, solar diagnostics, and battery health:
type: vertical-stack
cards:
- type: entities
title: Office Shade Controls
show_header_toggle: false
entities:
- entity: cover.office_shade_smart
name: Smart Tracking Shade
- entity: cover.office_shade_tilt
name: Slat Tilt Position
- type: divider
- entity: sensor.office_shade_battery
name: Battery Level (Calibrated)
- type: glance
title: Solar Status
show_state: true
entities:
- entity: cover.office_shade_smart
attribute: tracking_status
name: Tracking
icon: mdi:sun-compass
- entity: cover.office_shade_smart
attribute: target_position
name: Solar Target
icon: mdi:bullseye-arrow
- entity: cover.office_shade_smart
attribute: manual_override
name: Override
icon: mdi:hand-back-right
- entity: cover.office_shade_smart
attribute: inactive_reason
name: Status Detail
icon: mdi:information-outline
- type: glance
title: Battery Health Diagnostics
show_state: true
entities:
- entity: sensor.office_shade_battery
attribute: raw_battery
name: Voltage
icon: mdi:lightning-bolt
- entity: sensor.office_shade_battery
attribute: learned_min
name: Learned 0%
icon: mdi:battery-minus
- entity: sensor.office_shade_battery
attribute: learned_max
name: Learned 100%
icon: mdi:battery-plus
- entity: sensor.office_shade_battery
attribute: is_charging
name: Charging
icon: mdi:battery-chargingA pre-built Home Assistant blueprint is included in this repository:
- Path:
blueprints/automation/spelech/shade_low_battery_notification.yaml
- In Home Assistant, navigate to Settings > Automations & Scenes > Blueprints.
- Click Import Blueprint and provide the repository URL or copy the file into your
<config>/blueprints/automation/spelech/directory. - Select your calibrated battery sensor, your desired low threshold (default
$20%$ ), and your mobile app device to receive notifications.
For an in-depth breakdown of the decoupled engine architecture and data flow, see ARCHITECTURE.md and our development guidelines in AGENTS.md.
custom_components/shade_complete/
βββ __init__.py # Integration lifecycle, setup, and services
βββ const.py # Domain constants, defaults, and attributes
βββ device.py # Device Registry co-location resolver
βββ cover.py # SmartTrackingShadeCover, TiltCoverEntity, GroupShadeCover
βββ sensor.py # CalibratedBatterySensor
βββ config_flow.py # UI Config Flow and dynamic Options Flow
βββ engine/
β βββ sun_engine.py # Pure domain solar vector calculations
β βββ battery_engine.py # Pure domain battery filtering & online 0-100 learning
β βββ schedule_engine.py # Pure domain automated closing & opening scheduler
βββ translations/
β βββ en.json # Complete English UI strings
βββ brand/
βββ icon.png # High-resolution integration icon
βββ logo.png # High-resolution integration logo
- Open HACS in your Home Assistant dashboard.
- Navigate to Integrations > Three dots menu (top right) > Custom repositories.
- Enter
https://github.com/spelech/ha-shade-completeand select Category: Integration. - Click Add, find Shade Complete, and click Download.
- Restart Home Assistant.
- Clone or download this repository.
- Copy the
custom_components/shade_completedirectory into your Home Assistant<config>/custom_components/directory. - Restart Home Assistant.
- In Home Assistant, go to Settings > Devices & Services > Add Integration.
- Search for Shade Complete.
- Choose your configuration mode:
- Smart Sun Tracking Shade: Complete package with solar tracking, schedule, tilt intercept, and battery calibration.
- Virtual Tilt Entity Only: Creates a tilt cover mapped to physical tilt.
- Synchronized Shade Group: Aggregates multiple shades with optional sun tracking and scheduling.
- Fill in your parameters using the UI form.
- You can re-tune angles, thresholds, auto-open/close times, tilt interception, or battery parameters at any time via Configure on the integration card!
Manually seed or override the learned 0β100% calibration bounds for a battery sensor:
service: shade_complete.calibrate_battery
data:
entity_id: sensor.living_room_shade_battery
min_val: 6.4
max_val: 8.4Clear an active manual override lock and immediately resume automatic solar tracking:
service: shade_complete.reset_manual_override
data:
entity_id: cover.living_room_shadeImmediately invoke the evening closing routine:
service: shade_complete.trigger_auto_close
data:
entity_id: cover.living_room_shadeImmediately invoke the morning opening routine:
service: shade_complete.trigger_auto_open
data:
entity_id: cover.living_room_shadeThis project enforces strict 4-stage CI quality gates as defined by our engineering toolbelt:
# Run release and link integrity check
python3 scripts/verify_release.py --skip-tests --ci
# Run Ruff linter and formatter
uv run ruff check .
uv run ruff format --check .
# Run test suite with strict coverage enforcement (>= 80%)
uv run pytest --cov=custom_components/shade_complete --cov-fail-under=80 -vDistributed under the MIT License. Copyright Β© 2026 Steven T. Pelech.
