-
Notifications
You must be signed in to change notification settings - Fork 9
Developer Setup
Jason Rhubottom edited this page Apr 20, 2026
·
1 revision
Before you begin development, ensure you have the following installed:
- Python 3.11+ - The integration requires Python 3.11 or higher
- Git - Version control
- Home Assistant Core - For testing the integration
- pip - Python package manager
-
GitHub CLI (
gh) - Required for automated releases - jq - Required for release script (JSON parsing)
- Visual Studio Code or PyCharm - Recommended IDEs with Home Assistant support
# Install Homebrew (if not already installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install required tools
brew install python@3.11 git gh jq
# Verify installations
python3 --version
git --version
gh --version
jq --versiongit clone https://github.com/jrhubott/adaptive-cover.git
cd adaptive-coverThe setup script installs development dependencies and configures pre-commit hooks:
./scripts/setupThis script will:
- Install Python development dependencies (ruff, pre-commit, etc.)
- Set up pre-commit hooks for automatic linting
- Configure your development environment
# Check linting works
./scripts/lint
# Verify pre-commit hooks are installed
pre-commit run --all-filesadaptive-cover/
βββ custom_components/adaptive_cover_pro/
β βββ __init__.py # Integration entry point
β βββ coordinator.py # Data coordinator (orchestrator, ~1,477 lines)
β βββ calculation.py # Position calculations (pure, 0 HA imports)
β βββ config_flow.py # Configuration UI
β βββ config_types.py # CoverConfig typed dataclass
β βββ sun.py # Solar calculations (pure, 0 HA imports)
β βββ engine/ # Next-gen calculation engine
β β βββ sun_geometry.py # SunGeometry dataclass
β β βββ covers/
β β βββ venetian.py # VenetianCoverCalculation (dual-axis)
β βββ managers/ # Extracted coordinator responsibilities
β β βββ manual_override.py # Manual override detection & tracking
β β βββ grace_period.py # Per-command + startup grace periods
β β βββ motion.py # Motion sensor timeout tracking
β β βββ position_verification.py # Periodic position verification
β β βββ cover_command.py # Cover service calls & delta checks
β βββ state/ # HA boundary layer (state providers)
β β βββ climate_provider.py # Reads climate/weather/presence entities
β β βββ cover_provider.py # CoverProvider β reads cover entity state
β β βββ snapshot.py # SunSnapshot, CoverStateSnapshot dataclasses
β β βββ sun_provider.py # Reads astral location from HA
β βββ pipeline/ # Override priority chain
β β βββ registry.py # Evaluates handlers in priority order
β β βββ types.py # PipelineContext, PipelineResult, DecisionStep
β β βββ handler.py # OverrideHandler base class
β β βββ handlers/ # 8 priority handlers
β β βββ force_override.py # Priority 100
β β βββ wind.py # Priority 95 (stub)
β β βββ motion_timeout.py # Priority 80
β β βββ manual_override.py # Priority 70
β β βββ climate.py # Priority 50
β β βββ solar.py # Priority 40
β β βββ cloud_suppression.py # Priority 35 (stub)
β β βββ default.py # Priority 0
β βββ diagnostics/ # Diagnostic data builder
β β βββ builder.py # DiagnosticsBuilder + DiagnosticContext
β βββ services/ # Service layer
β β βββ configuration_service.py
β βββ sensor.py # Sensor platform
β βββ switch.py # Switch platform
β βββ binary_sensor.py # Binary sensor platform
β βββ button.py # Button platform
β βββ entity_base.py # Base entity classes
β βββ helpers.py # Utility functions
β βββ const.py # Constants
β βββ enums.py # Type-safe enumerations
β βββ geometry.py # Geometric utilities
β βββ position_utils.py # Position conversion utilities
β βββ config_context_adapter.py # Logging adapter
β βββ manifest.json # Integration metadata
β βββ translations/ # i18n files
βββ tests/ # Unit tests (751 tests)
β βββ conftest.py # Shared fixtures
β βββ test_calculation.py # Core calculation tests
β βββ test_geometric_accuracy.py
β βββ test_sill_height.py
β βββ test_control_state_reason.py
β βββ test_position_explanation.py
β βββ test_position_limits.py
β βββ test_inverse_state.py
β βββ test_manual_override.py
β βββ test_motion_control.py
β βββ test_force_override_sensors.py
β βββ test_startup_grace_period.py
β βββ test_delta_position.py
β βββ test_interpolation.py
β βββ test_helpers.py
β βββ test_time_window_sensor.py
β βββ test_coordinator_logging.py
β βββ test_managers/ # Manager unit tests
β βββ test_pipeline/ # Pipeline handler tests
β βββ test_state/ # State provider tests
β βββ test_engine/ # Engine module tests
β βββ test_diagnostics/ # Diagnostics builder tests
βββ scripts/
βββ docs/
βββ release_notes/
βββ notebooks/
βββ CLAUDE.md
βββ HANDOFF.md
βββ README.md
βββ pyproject.toml
π Getting Started
- Installation
- Migrating from Custom Repository
- Migrating from Adaptive Cover
- First-Time Setup
- Cover Types
π§ Core Concepts
π Cover Types
βοΈ Configuration
- Sun Tracking
- Position
- Glare Zones
- Automation
- Custom Position
- Force Override
- Weather Safety
- Climate
- Blindspot
- Summary Screen
- Debug & Diagnostics
π Entities & Services
π¨ Dashboard
π§ Advanced Use Cases
π οΈ Operations
π§ͺ Testing & Simulation
π Reference
π©βπ» For Developers