Knowledge Base updated: 2026-10-20
Adaptive Lighting knowledge base
Orientation
Adaptive Lighting is a Home Assistant custom integration that continuously applies time-aware brightness and color settings to configured lights.
The core runtime lives in custom_components/adaptive_lighting/, where integration setup, configuration entries, adaptation calculations, light service handling, switches, and diagnostics share per-entry state.
Supporting preview tooling, tests, workflows, and integration metadata validate and deliver the component.
Architecture
flowchart TD
HA[Home Assistant] --> Init[Integration lifecycle]
Init --> Setup[Setup and coordination]
HA --> Config[Configuration flow and options]
Config --> Setup
Setup --> Engine[Adaptive Lighting control engine]
Engine --> Calc[Light adaptation calculations]
Engine --> Commands[Light state and command handling]
Commands --> Lights[Home Assistant light entities]
HA --> Switches[Switches and service controls]
Switches --> Engine
Setup --> Diagnostics[Integration diagnostics]
Tests[Tests and developer tooling] --> Engine
Preview[Color and brightness preview app] --> Calc
Workflows[Validation and release automation] --> Tests
Workflows --> Metadata[Integration metadata]
Glossary
- Adaptive Lighting instance: One configured integration entry and its associated runtime controls and managed lights.
- Adaptation: The process of deriving desired brightness and color characteristics for a light at a given time.
- Manual control: User or automation interaction that can affect whether and how a light continues to receive adaptive updates.
- Config entry: Home Assistant’s persisted configuration record for an integration instance.
Invariants
- Runtime state is scoped to configured integration entries, with setup and teardown coordinated through custom_components/…/__init__.py.
- Light updates must respect each target’s reported capabilities and state before calling Home Assistant light services; see
custom_components/adaptive_lighting/light-handling modules. - User-facing configuration is represented through Home Assistant config entries and options flows in custom_components/…/config_flow.py.
- Diagnostics must expose troubleshooting data without leaking sensitive configuration values; see custom_components/…/diagnostics.py.
- Published integration metadata remains synchronized with its distributable files, including custom_components/…/manifest.json and repository automation.
Routing table
- custom_components/…/__init__.py -> docs/adaptive-lighting-integration-lifecycle.md
- custom_components/…/const.py -> docs/adaptive-lighting-integration-lifecycle.md
- custom_components/…/__init__.py -> docs/integration-setup-and-coordination.md
- custom_components/…/manifest.json -> docs/integration-setup-and-coordination.md
- custom_components/…/diagnostics.py -> docs/integration-diagnostics.md
- custom_components/…/*.py -> docs/adaptive-lighting-control-engine.md
- custom_components/…/helpers.py -> docs/light-adaptation-calculations.md
- custom_components/…/adaptation.py -> docs/light-adaptation-calculations.md
- custom_components/…/switch.py -> docs/light-state-and-command-handling.md
- custom_components/…/helpers.py -> docs/light-state-and-command-handling.md
- custom_components/…/config_flow.py -> docs/adaptive-lighting-user-configuration.md
- custom_components/…/strings.json -> docs/adaptive-lighting-user-configuration.md
- custom_components/…/config_flow.py -> docs/configuration-flow-and-options.md
- custom_components/…/strings.json -> docs/configuration-flow-and-options.md
- custom_components/…/switch.py -> docs/switches-and-service-controls.md
- custom_components/…/services.yaml -> docs/switches-and-service-controls.md
- README.md -> docs/adaptive-lighting-development-delivery.md
.github/**-> docs/adaptive-lighting-development-delivery.mdexample/**-> docs/color-and-brightness-preview-app.mdscripts/**-> docs/color-and-brightness-preview-app.mdtests/**-> docs/validation-and-release-automation.md.github/workflows/**-> docs/validation-and-release-automation.md- pyproject.toml -> docs/validation-and-release-automation.md
- custom_components/…/manifest.json -> docs/validation-and-release-automation.md