Sun Shade Integration for Home Assistant
A Home Assistant custom integration that uses 3D ray-casting simulation to determine when direct sunlight reaches indoor plants through windows.
* Sun
/
/ azimuth + elevation
/
=================/=================
|| WALL | | WALL ||
|| | | || OUTSIDE
|| | W | ||
|| | I | ||
|| | N | ray ||
|| | D |/ ||
=============| O |============/
| W |\
| | \ +------------------------------+
+-----+ \ | Home Assistant Entities |
\ \ |------------------------------|
/---\--\ | window_1a has sun: ON |
ROOM | // \ | | window_1a intensity: 78% |
| PLANT | | window_1a angle: 25 deg |
| \\ / | | |
+-------+ | Plant sun start: 13:45 |
| Plant sun end: 15:30 |
| Plant sun duration: 120 min |
+-------------------------------+
Entities Created
Per window (real-time, updated every N seconds):
binary_sensor.<window>_has_sun— whether the window is receiving direct sunlightsensor.<window>_sun_intensity— intensity factor (0-100%)sensor.<window>_sun_angle— angle between sun and window normal (0-90 deg)
Plant-level (daily forecast, computed once per day):
sensor.plant_sun_start— first time sun hits the plant today (like sunrise)sensor.plant_sun_end— last time sun hits the plant today (like sunset)sensor.plant_sun_duration— total sun exposure in minutes (like day length)
Installation
HACS (Recommended)
- Open HACS in your Home Assistant instance
- Click the three dots in the top right corner and select Custom repositories
- Add
https://github.com/matiazo/SunHitsIndoorPlant3DSimulatorwith category Integration - Click Install
- Restart Home Assistant
- Go to Settings > Integrations > Add Integration and search for "Sun Shade Integration"
Manual
- Copy the
custom_components/sun_shade_integrationfolder into your Home Assistantconfig/custom_components/directory - Restart Home Assistant
- Go to Settings > Integrations > Add Integration and search for "Sun Shade Integration"
Documentation
See the full integration docs at custom_components/sun_shade_integration/README.md for config flow details, entity reference, and troubleshooting.
Metadata
Release files for sun-hit-detector 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sun_hit_detector-2.2.1.tar.gz | 52.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sun_hit_detector-2.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 96.8 kB
Release files / sun_hit_detector-2.2.1.tar.gz
| Download URL | sun_hit_detector-2.2.1.tar.gz |
|---|---|
| Size | 52.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42d9dff648612bcf59650ff44004fa287270b173fc00f065ee68e1509000c99f
|
|
BLAKE2b-256 checksum How to use checksums |
4c47ed5c9709e8304201e63a197f172c93132a1d68e5994d65e6ef1a1b8a1e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency logRelease files / sun_hit_detector-2.2.1-py3-none-any.whl
| Download URL | sun_hit_detector-2.2.1-py3-none-any.whl |
|---|---|
| Size | 44.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0a1b80bce4cb27b50f4ec0d2d96659c1f4c8bef54fd1988095fc94a2cea6992
|
|
BLAKE2b-256 checksum How to use checksums |
0e53bc3224a2ede93e6a3339a2c3d97a921f8e3eb61faaf7386706d212df7b7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 11, 2026.
Transparency log