Skip to main content

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 sunlight
  • sensor.<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)

  1. Open HACS in your Home Assistant instance
  2. Click the three dots in the top right corner and select Custom repositories
  3. Add https://github.com/matiazo/SunHitsIndoorPlant3DSimulator with category Integration
  4. Click Install
  5. Restart Home Assistant
  6. Go to Settings > Integrations > Add Integration and search for "Sun Shade Integration"

Manual

  1. Copy the custom_components/sun_shade_integration folder into your Home Assistant config/custom_components/ directory
  2. Restart Home Assistant
  3. 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)

Source distribution for sun-hit-detector 2.2.1
File Size Uploaded
sun_hit_detector-2.2.1.tar.gz 52.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sun-hit-detector 2.2.1
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

2.2.1 This release

2 release files

2.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page