Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🪟☀️ SmartShade Pro — Roller Shade Autopilot (Sun + Temp)

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

✨ Features

  • 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 configured min_open
  • Temperature gating (hysteresis)
    • ON at shading_temp_on
    • OFF at shading_temp_off
  • 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

✅ Requirements (Helpers you must create)

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
  • input_number.override_snapshot_mode_* (0..2)
  • input_number.override_snapshot_shade_* (0..1)

You also need:

  • sun.sun entity (built-in)
  • a sensor for outdoor temperature
  • your dynamic day/night elevation threshold sensors (or fixed ones you provide)

🚀 Installation (Import Blueprint)

  1. Home Assistant → Settings → Automations & Scenes → Blueprints
  2. Import Blueprint
  3. 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


🧠 Tuning Guide (Real-world settings)

  • 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

🧯 Troubleshooting

“It sets manual override even though I didn’t touch it”

Increase Auto-move grace window (manual_grace_seconds). Some covers report position updates for a long time while moving.

“It shades too aggressively”

Reduce strength (e.g. 0.7) or increase shade_elev_low.

“My shade goes the wrong direction (inverted)”

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.


📄 License

MIT — do what you want, just keep the copyright.

About

a HomeAssistant blueprint that drives your roller shades like a comfort-first product

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors