Manual Override. Temperature gating. Anti-jitter. Zero drama.
SmartShade Pro is a Home Assistant Blueprint that controls a roller shade like a comfort-first product:
- Shades only when the sun actually hits your window
- Gates shading via outdoor temperature + hysteresis (no fluttering)
- Detects manual intervention and politely steps aside ✋
- Prevents “zapping” with a deadband and a drive interval
- Sun + window geometry
- Bearing + tolerance checks if the sun hits your window
- Smooth shading ramp based on sun elevation
- Night mode
- Moves to
night_pos, but never below your configuredmin_open
- Moves to
- Temperature gating (hysteresis)
- ON at
shading_temp_on - OFF at
shading_temp_off
- ON at
- Manual override
- Manual movement sets an override
- Automation resumes only on a “real event”:
- mode changes (Day/Night/Twilight), or
- shading permission toggles (hysteresis)
- Anti-jitter
- Drive only every
update_minutes - Move only if change ≥
deadband_percent
- Drive only every
Create these helpers in Home Assistant:
input_number.min_open_*(0..100)input_boolean.shade_state_*(shading permission)input_boolean.manual_override_*(override flag)input_number.last_auto_move_epoch_*
IMPORTANT: set range large enough, e.g.:- min:
0 - max:
9999999999 - step:
1
- min:
input_number.override_snapshot_mode_*(0..2)input_number.override_snapshot_shade_*(0..1)
You also need:
sun.sunentity (built-in)- a sensor for outdoor temperature
- your dynamic day/night elevation threshold sensors (or fixed ones you provide)
- Home Assistant → Settings → Automations & Scenes → Blueprints
- Import Blueprint
- Paste the URL to the YAML file in this repo.
Recommended URL style (raw file):
https://raw.githubusercontent.com/Lunicorn-lab/smartshade-pro/main/blueprints/automation/Lunicorn-lab/smartshade_pro.yaml
- Drive interval: 3–10 minutes (start with 5)
- Deadband: 3–8% (start with 5)
- Auto-move grace window: 30–90 seconds
If your cover reports many position updates while moving, increase this. - Bearing tolerance: 35–70° depending on how picky you want “sun hits window” to be
Increase Auto-move grace window (manual_grace_seconds). Some covers report position updates for a long time while moving.
Reduce strength (e.g. 0.7) or increase shade_elev_low.
Some covers invert 0/100 semantics. You can often fix this in the integration/device settings.
As a workaround, swap your configured max_open/night_pos logic or use an inverted template cover.
MIT — do what you want, just keep the copyright.