A deterministic geometric simulator for sunlight-plant hit detection
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sun_hit_detector-2.2.0.tar.gz.
File metadata
- Download URL: sun_hit_detector-2.2.0.tar.gz
- Upload date:
- Size: 52.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
201c0f85ffec03bc4b6ffe11e3649c1928c79ef4db60a6fdcda84e3bc60744b0
|
|
| MD5 |
cf04dff3f33e9570d7d30aa518059a68
|
|
| BLAKE2b-256 |
96427e78662a27a3cdc53b77284ee04d131facaf0a8ed7a06aa604f74f2a4c0d
|
Provenance
The following attestation bundles were made for sun_hit_detector-2.2.0.tar.gz:
Publisher:
publish.yml on matiazo/SunHitsIndoorPlant3DSimulator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sun_hit_detector-2.2.0.tar.gz -
Subject digest:
201c0f85ffec03bc4b6ffe11e3649c1928c79ef4db60a6fdcda84e3bc60744b0 - Sigstore transparency entry: 1077838954
- Sigstore integration time:
-
Permalink:
matiazo/SunHitsIndoorPlant3DSimulator@86c333c0b49624f8fc1dcd40d89516c6b1cb3325 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/matiazo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@86c333c0b49624f8fc1dcd40d89516c6b1cb3325 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sun_hit_detector-2.2.0-py3-none-any.whl.
File metadata
- Download URL: sun_hit_detector-2.2.0-py3-none-any.whl
- Upload date:
- Size: 44.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e921229b7efc5b87f06dcd083191d4013bb24d4cd6e804c3b6f299189b330a63
|
|
| MD5 |
265c3c1239614f9ed9c5e52d891447de
|
|
| BLAKE2b-256 |
c95c9a5b494c87c6849d14004bcc08f129f9e8dd86fcbdf2e293e3877ca4a524
|
Provenance
The following attestation bundles were made for sun_hit_detector-2.2.0-py3-none-any.whl:
Publisher:
publish.yml on matiazo/SunHitsIndoorPlant3DSimulator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sun_hit_detector-2.2.0-py3-none-any.whl -
Subject digest:
e921229b7efc5b87f06dcd083191d4013bb24d4cd6e804c3b6f299189b330a63 - Sigstore transparency entry: 1077838981
- Sigstore integration time:
-
Permalink:
matiazo/SunHitsIndoorPlant3DSimulator@86c333c0b49624f8fc1dcd40d89516c6b1cb3325 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/matiazo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@86c333c0b49624f8fc1dcd40d89516c6b1cb3325 -
Trigger Event:
release
-
Statement type: