⚠️ DEVELOPMENT WARNING: This integration is currently under active development and is not yet ready for production use. Features may be incomplete, and the API may change. Use at your own risk.
A custom Home Assistant integration for accurate sun position calculations using astronomical algorithms.
- Accurate Sun Position: Calculate azimuth and elevation using ephem library
- Automatic Pressure Calculation: Uses ambiance library to calculate atmospheric pressure from elevation
- User Configurable: Customize location, elevation, temperature, and atmospheric conditions
- Multiple Sensors: Extensible sensor platform for various sun-related measurements
- Consistent Naming: Automatic naming conventions for all sensors and input entities
- Add this repository to HACS as a custom repository
- Search for "Sol" in the HACS integrations
- Click "Download" and restart Home Assistant
- Go to Settings > Devices & Services > Integrations
- Click + ADD INTEGRATION and search for "Sol"
- Download this repository
- Copy the
custom_components/sol
folder to your Home Assistantcustom_components
directory - Restart Home Assistant
- Go to Settings > Devices & Services > Integrations
- Click + ADD INTEGRATION and search for "Sol"
The integration requires minimal configuration:
- Latitude/Longitude: Optional - uses Home Assistant system defaults if not provided
- Elevation: Your location's elevation in meters (used for pressure calculation)
- Pressure Mode:
- Auto: Automatically calculated from elevation (recommended)
- Manual: Set your own pressure value
- Temperature: Local temperature in Celsius (affects atmospheric calculations)
- Horizon: Horizon offset in degrees (default: 0°)
- Sol - Status: Basic status sensor (template)
- Sol - Elevation: Current sun elevation in degrees
- Sun azimuth angle
- Sunrise/sunset times
- Solar noon
- Daylight hours
- Solar power calculations
- ephem: Astronomical calculations
- ambiance: Atmospheric pressure calculations (lightweight, no compilation required)
- python-slugify: Clean entity naming
This integration is built with:
- Consistent naming conventions for all entities
- Modular design with shared calculation utilities
- User-friendly configuration with sensible defaults
- Robust error handling with fallback calculations
For issues and feature requests, please create an issue in the GitHub repository.
This project is licensed under the MIT License.