A Home Assistant custom component that calculates solar energy on windows and provides intelligent shading recommendations based on weather conditions, temperature thresholds, and configurable scenarios.
- 100% UI-Based Configuration: No YAML required - complete setup through Home Assistant UI
- Multi-Step Config Flow: Guided setup with global sensors, groups, and individual windows
- Hierarchical Structure: Global → Groups → Windows with inheritance and overrides
- "Set & Forget" Physical Properties: Configure geometry once via Config Flow
- "Tweak & Play" Thresholds: Adjust thresholds and scenarios dynamically via dashboard entities
- Shading Recommendations: Smart "Shading Recommended" binary sensors with 3 scenarios:
- Inside Temperature: Current indoor comfort levels
- Outside Temperature: Outdoor conditions
- Weather Forecast: Predictive based on forecasted temperatures
- Weather Override: Master override via weather warning sensor disables all recommendations
- Aggregated Readings: Energy and shading status at window, group, and global levels
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add this repository URL:
https://github.com/jmerifjKriwe/solar-window-system - Select "Integration" as the category
- Click "Add"
- Search for "Solar Window System" and install it
- Restart Home Assistant
- Go to "Settings" > "Devices & Services"
- Click "Add Integration"
- Search for "Solar Window System"
- Follow the configuration wizard
- Copy the
custom_components/solar_window_systemdirectory to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to "Settings" > "Devices & Services"
- Click "Add Integration"
- Search for "Solar Window System"
- Follow the configuration wizard
-
Global Setup: Select required sensors and set default window properties
- Solar irradiance sensor (required)
- Outdoor temperature sensor (required)
- Optional: Indoor temperature, diffuse irradiance, weather warning
-
Add Groups (Subentry Flow): Create logical groups
- Room groups: With indoor temperature sensor
- Orientation groups: Summary by cardinal direction
- Group properties can be inherited by windows
-
Add Windows (Subentry Flow): Configure each window
- Geometry: Width, height, azimuth, visible range
- Properties: g-value, frame width, window recess, shading depth
- Group assignment for inheritance
Use "Reconfigure" in the integration settings to:
- Change global sensors
- Adjust default properties
- Add/remove groups and windows via subentries
Configured once via Config Flow:
- Geometry: Window size, orientation, visible range
- Physical Properties: g-value, frame width, shading depth
- These values rarely change and are stored in the Config Entry
Dynamically adjustable via dashboard entities:
- Number Entities: Thresholds for indoor/outdoor temperature, forecast, solar energy
- Switch Entities: Toggle the 3 scenarios on/off
- Button Entities: Reset overrides per window/group
- Changes are active immediately and persistently saved
{window} Direct Energy: Direct solar radiation{window} Diffuse Energy: Diffuse radiation from the sky{window} Combined Energy: Total solar heat load- Group and Global variants for aggregation
{window/Group/Global} Shading Recommended: ON when shading is recommended- Icon: mdi:blinds-closed (ON) / mdi:blinds-open (OFF)
- Device Class: window
Thresholds for each window/group/global:
Indoor Temperature Threshold: Trigger for indoor overheating (default: 24°C)Outdoor Temperature Threshold: Trigger for outdoor conditions (default: 25°C)Forecast Temperature Threshold: Proactive shading (default: 28°C)Solar Energy Threshold: Minimum heat load for recommendation (default: 300 W/m²)
Scenario toggles for each window/group/global:
Scenario: Indoor Temperature: Indoor temp check on/offScenario: Outdoor Temperature: Outdoor temp check on/offScenario: Weather Forecast: Forecast check on/off
Reset Overrides: Clears all dynamic overrides, reverts to default values
Weather warning sensor (optional): When ON, all shading recommendations are suppressed.
Shading is recommended when:
- Indoor Temperature Scenario ACTIVE:
indoor_temp > threshold_indoor - Outdoor Temperature Scenario ACTIVE:
outdoor_temp > threshold_outdoor - Forecast Scenario ACTIVE:
forecast_high > threshold_forecastANDindoor_temp > threshold_forecast - 2
AND at least one scenario triggers AND solar_energy > threshold_radiation
- Window overrides have priority
- If not set: Group values
- If not set: Global defaults
- Button "Reset Overrides" clears Window/Group overrides
The easiest way to develop is using the VS Code DevContainer:
- Open the project in VS Code
- Press
F1→ "Dev Containers: Reopen in Container" - Wait for the container to build (~2-3 minutes)
- Run
scripts/start-ha.shto start Home Assistant - Open http://localhost:8123
See .devcontainer/README.md for details.
Alternatively, you can develop locally with:
- Python 3.14+
- See
scripts/README.mdfor setup instructions
MIT License - see LICENSE file for details