The World's 1st Local Transformer-AI Solar Forecast for Home Assistant — 100% Local, 100% Private
Your roof. Your data. Your AI. Solar Forecast ML builds a digital twin of your specific solar setup using a custom Transformer architecture that runs entirely on your Home Assistant hardware. It learns your roof geometry, local shading, microclimate, and inverter behavior — delivering 3-day hourly forecasts with up to 97% accuracy. Version 32 introduces the SFML Source-of-Truth architecture: critical production and energy calculations are handled inside SFML's own database instead of relying on Home Assistant's recorder-derived energy helpers. No cloud, no subscriptions, no data leakage. Just pure local intelligence.
Fuel my late-night ideas with a coffee? I'd really appreciate it — keep this project running!

While others provide generic solar estimates, Solar Forecast ML uses the Hubble AI Stack to build a digital twin of your specific roof. It's the first native Attention & Transformer AI designed to run entirely on your Home Assistant hardware — learning your unique setup from the ground up: roof geometry, local shading, microclimate, and inverter behavior.
Powered by proprietary AI models, a local machine learning engine, and a solar physics backbone, it delivers 3-day hourly forecasts with up to 97% accuracy after calibration. Everything runs on your hardware with a transactional SQL database for reliability. No cloud dependencies, no subscriptions, no data leakage. Your smart home gains foresight, optimizing energy use before the sun even rises.
Most integrations (like Forecast.Solar or Solcast) use static cloud models. They don't know about your neighbor's tree or why your yield drops every November. Solar Forecast ML is the evolution:
| Feature | Standard Cloud Forecasts | Solar Forecast ML (Hubble AI) |
|---|---|---|
| Logic | Static APIs / Generic Formulas | SOTA Transformer & Attention AI |
| Privacy | Data sent to the cloud | 100% Local & Private |
| Shadows | None or very basic | Dynamic Seasonal Shadow Mapping |
| Environment | Ignores local anomalies | Detects Snow, Fog, Pollution & Altitude |
| Adaptability | One size fits all | Learns your specific inverter/panel quirks |
| Reliability | "Black Box" predictions | Physics-Backbone + AI Safeguard |
Version 32 makes SFML the authoritative runtime layer for solar production data. Home Assistant remains the interface, but SFML now owns the critical calculations, validation, and persistence path for its solar truth.

"It's kind of like building a Hubble telescope in your living room just to check if the fridge light is on in the kitchen… simply because it's cool." — Basti, Tester
The heart of this integration is the AI-Stack codename Hubble, a custom-built AI ensemble. I didn't just wrap a library — I built a native Transformer architecture from the ground up to fit into Home Assistant's resource limits, without needing TensorFlow or PyTorch.
This isn't a single model. It's a sophisticated ensemble of specialized AIs working in harmony:
| Component | Purpose | What It Does |
|---|---|---|
| Hybrid-AI V8.0 | Core Neural Engine | Stacked LSTM with Multi-Head Attention and Transformer elements. Analyzes 24-hour sequences for per-panel-group forecasts, capturing complex temporal patterns. |
| Miss Ridge | Quick-Start Model | High-stability model for early-phase predictions (from Day 10 onward), bridging the gap to full ensemble activation. |
| Frau Holle | Weather Correction AI | Multi-layer perceptron that non-linearly adjusts weather data based on local sensors and historical biases. |
| Kalman Tracker | Real-Time Adjustment | Adaptive filter monitoring minute-by-minute bias, dynamically responding to weather volatility. |
| Physics Backbone | Geometric Foundation | Calculates theoretical output with a PhysicsCalibrator that learns deviations from real production (shading, efficiency, aging). |
| Graduated Safeguard | Ensemble Oversight | Monitors model agreement; blends confidently when aligned, falls back to physics during divergence. No hallucinations. |
| Subprocess Trainer | HA Performance Guard | Runs CPU-intensive EOD model training (LSTM/MLP) in an isolated Python worker process, preventing HA event-loop blockages. |
Multi-Head Attention — Instead of looking at weather as a simple list, Hubble understands temporal context: how a cloudy morning should influence your battery strategy for the afternoon. It reasons across time, not just snapshots.
Graduated Safeguard — No AI "hallucinations." If the models diverge too strongly, the Physics-Backbone (pure solar geometry) steps in as a safety anchor. The AI knows when to be confident — and when to step back.
Efficiency Drift Detection — Most forecasts go wrong because they don't know your panels are dirty or aging. Hubble tracks your real-world efficiency over time and tells you when it's time to clean them.
Additional self-monitoring layers ensure long-term accuracy: - Drift Monitor & Seasonal Adjuster — Detects biases and learns seasonal patterns from real data, not calendars. - Grid Search "The Professor" — Fully automated hyperparameter optimization, extracting the maximum from your specific hardware. - Subprocess training (HA-Performance-Fix) — CPU-intensive model training runs in a separate Python process to prevent Home Assistant UI lags.

Solar Forecast ML is the only solar forecast integration that understands the messy reality of your environment. While other systems treat every roof as identical, Hubble monitors the real-world conditions that actually impact your production — from snow-covered panels to seasonal shadows, from coastal salt haze to altitude-dependent air mass. Every factor is learned, tracked, and applied automatically.
❄️ Snow Logic — Recognizes when panels are covered and stops contaminated data from polluting your AI training. A snow day doesn't corrupt your model.
烟 Fog & Visibility — Uses a learned visibility tracker to evaluate which weather source is most accurate for your specific coordinates.
🌬️ Atmospheric Depth — Adjusts for actual air mass. Crucial if you live at altitude or near the sea — your atmosphere is not the same as your neighbor's.
🌳 The Moving Shadow — Learns how shadows from trees and buildings change across seasons, accounting for leaves in summer and bare branches in winter.
🌿 Air Pollution Awareness — Detects atmospheric aerosols: rapeseed pollen, coastal salt haze, industrial smog. All of it affects your production, and Hubble knows it.
🔋 MPPT & Battery Intelligence — Detects inverter clipping and battery-full curtailment. These events are excluded from AI training, so your model reflects true panel capacity — not artificially limited output.
$ claude mcp add Solar-Forecast-ML \
-- python -m otcore.mcp_server <graph>