Add custom mode tutorial and update docs for pure blueprint architecture
Add ADDING_MODES.md tutorial covering: - UI-created modes (recommended) and package-defined modes - Complete schema reference with nested al_config - Behavior types (adaptive_lighting, scene, script) - Manual control support and advanced examples Update all documentation to reflect: - Zero YAML editing for room setup (UI-driven workflow) - Convention-based mode lookup pattern - Pure blueprint architecture (3 core + 3 optional blueprints) - Extensibility via helpers instead of template copying
This commit is contained in:
130
README.md
130
README.md
@@ -2,70 +2,110 @@
|
||||
|
||||
## Adaptive Lighting Mode System
|
||||
|
||||
A comprehensive mode-based lighting control system for Inovelli Blue Dimmer
|
||||
Switches with Adaptive Lighting integration.
|
||||
A comprehensive mode-based lighting control system with **pure blueprint architecture** and **zero YAML editing** for room setup. Features convention-based mode lookup allowing unlimited custom modes with no code changes.
|
||||
|
||||
### Features
|
||||
|
||||
- **Room-specific modes**: Define custom lighting modes per room (Reading,
|
||||
Theater, Sleep, etc.)
|
||||
- **Visual LED feedback**: LED bar color indicates current mode
|
||||
- **Config button control**: Press config button to cycle through modes
|
||||
- **Multi-tap actions**: Double-tap boost, triple-tap max/night light
|
||||
- **Adaptive Lighting integration**: Dynamic brightness and color following sun
|
||||
position
|
||||
- **Version controlled**: All configuration in git-trackable package files
|
||||
- **Convention-based mode lookup**: Add "Bowling" mode by creating one helper - no code changes needed
|
||||
- **UI-driven room configuration**: Setup entire rooms via Home Assistant UI - zero YAML editing required
|
||||
- **Weekend mode blueprints**: Automatic schedule adjustments for weekends (delayed sunrise, extended sunset)
|
||||
- **Extensible behavior system**: Supports Adaptive Lighting, scene-based, and script-based modes
|
||||
- **Manual control support**: Any mode can pause AL with `manual_control` attribute
|
||||
- **Visual LED feedback**: LED bar color indicates current mode (optional Inovelli integration)
|
||||
- **8 essential modes**: Adaptive, Relaxing, Sleep, Theater, Party, Cooking, Dining, Cleanup
|
||||
|
||||
### System Components
|
||||
### Architecture
|
||||
|
||||
**Blueprints** (Reusable):
|
||||
- `inovelli_mode_cycling.yaml` - Config button cycles modes with LED feedback
|
||||
- `inovelli_button_actions.yaml` - Multi-tap brightness controls
|
||||
- `presence_mode_reset.yaml` - Auto-reset on room exit
|
||||
**Pure blueprint architecture** with global mode definitions:
|
||||
|
||||
**Packages** (Templates):
|
||||
- `adaptive_lighting_global.yaml` - Shared mode definitions and colors
|
||||
- `adaptive_lighting_bedroom_template.yaml` - Complete bedroom example
|
||||
- `adaptive_lighting_living_room_template.yaml` - Living room example
|
||||
- `adaptive_lighting_simple_template.yaml` - Minimal single-mode room
|
||||
- **3 core blueprints**: Mode application + 2 weekend mode blueprints
|
||||
- **1 global package**: 8 shipped modes with nested JSON schema
|
||||
- **UI-created helpers**: Room-specific dropdowns and toggles created via Settings → Helpers
|
||||
- **UI-created automations**: No package copying or YAML editing required
|
||||
|
||||
### Setup Guide
|
||||
**Key principle**: **Convention over configuration** - modes are discovered by naming convention, not hardcoded logic.
|
||||
|
||||
**Quick Start**:
|
||||
1. Install Adaptive Lighting integration via HACS
|
||||
2. Follow [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) to enable packages
|
||||
3. Copy templates from `packages/` directory
|
||||
4. Import blueprints via UI
|
||||
5. See [ROOM_CONFIGURATION_GUIDE.md](ROOM_CONFIGURATION_GUIDE.md) for examples
|
||||
### Quick Start
|
||||
|
||||
**Documentation**:
|
||||
- [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) - Initial setup and version
|
||||
control
|
||||
- [ROOM_CONFIGURATION_GUIDE.md](ROOM_CONFIGURATION_GUIDE.md) - Room-by-room
|
||||
examples
|
||||
- [ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md](ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md) -
|
||||
Complete system design
|
||||
**Step 1: Install Adaptive Lighting integration via HACS**
|
||||
|
||||
**Files**:
|
||||
- `packages/adaptive_lighting_global.yaml` - Required for all rooms
|
||||
- `packages/adaptive_lighting_bedroom_template.yaml` - Template for bedrooms
|
||||
- `packages/adaptive_lighting_living_room_template.yaml` - Template for common
|
||||
areas
|
||||
- `packages/adaptive_lighting_simple_template.yaml` - Template for simple rooms
|
||||
- `blueprints/automation/inovelli_mode_cycling.yaml` - Config button mode
|
||||
cycling
|
||||
- `blueprints/automation/inovelli_button_actions.yaml` - Multi-tap actions
|
||||
- `blueprints/automation/presence_mode_reset.yaml` - Auto-reset on room exit
|
||||
**Step 2: Import blueprints**
|
||||
|
||||
Settings → Automations & Scenes → Blueprints → Import Blueprint
|
||||
|
||||
Import URLs (see below for full list)
|
||||
|
||||
**Step 3: Install global package**
|
||||
|
||||
Follow [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) to install `adaptive_lighting_global.yaml`
|
||||
|
||||
**Step 4: Create helpers and automations via UI**
|
||||
|
||||
Follow [ROOM_CONFIGURATION_GUIDE.md](ROOM_CONFIGURATION_GUIDE.md) for complete UI workflow
|
||||
|
||||
**Step 5: (Optional) Add custom modes**
|
||||
|
||||
Follow [ADDING_MODES.md](ADDING_MODES.md) to create "Reading" mode or any custom mode
|
||||
|
||||
### Documentation
|
||||
|
||||
- [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) - Installing global package and blueprints
|
||||
- [ROOM_CONFIGURATION_GUIDE.md](ROOM_CONFIGURATION_GUIDE.md) - UI-driven room setup (no YAML editing)
|
||||
- [ADDING_MODES.md](ADDING_MODES.md) - Tutorial for creating custom modes
|
||||
- [ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md](ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md) - System architecture design
|
||||
|
||||
### File Inventory
|
||||
|
||||
**Blueprints** (3 core + 3 optional):
|
||||
|
||||
**Core blueprints** (required for mode system):
|
||||
- `blueprints/automation/apply_lighting_mode.yaml` - Data-driven mode application with convention-based entity lookup
|
||||
- `blueprints/automation/weekend_mode_schedule.yaml` - Auto-enable/disable weekend mode based on day of week
|
||||
- `blueprints/automation/weekend_mode_apply_settings.yaml` - Apply AL adjustments when weekend mode toggles
|
||||
|
||||
**Optional blueprints** (for Inovelli switches and presence-based automation):
|
||||
- `blueprints/automation/inovelli_mode_cycling.yaml` - Config button cycles modes with LED feedback
|
||||
- `blueprints/automation/inovelli_button_actions.yaml` - Multi-tap brightness controls
|
||||
- `blueprints/automation/presence_mode_reset.yaml` - Auto-reset mode on room exit
|
||||
|
||||
**Packages** (1 file):
|
||||
- `packages/adaptive_lighting_global.yaml` - Global mode definitions (8 modes with nested schema)
|
||||
|
||||
**Documentation** (6 files):
|
||||
- `README.md` - Main documentation (this file)
|
||||
- `PACKAGE_SETUP_GUIDE.md` - Global package installation
|
||||
- `ROOM_CONFIGURATION_GUIDE.md` - UI-driven room setup
|
||||
- `ADDING_MODES.md` - Custom mode creation tutorial
|
||||
- `CLAUDE.md` - Claude Code instructions
|
||||
- `ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md` - Architecture design doc
|
||||
|
||||
### Import URLs
|
||||
|
||||
**Blueprints**:
|
||||
**Core mode system blueprints**:
|
||||
```
|
||||
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/apply_lighting_mode.yaml
|
||||
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/weekend_mode_schedule.yaml
|
||||
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/weekend_mode_apply_settings.yaml
|
||||
```
|
||||
|
||||
**Optional Inovelli and presence blueprints**:
|
||||
```
|
||||
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/inovelli_mode_cycling.yaml
|
||||
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/inovelli_button_actions.yaml
|
||||
https://git.johnogle.info/johno/home-assistant-blueprints/raw/branch/main/blueprints/automation/presence_mode_reset.yaml
|
||||
```
|
||||
|
||||
### Extensibility Example
|
||||
|
||||
**Traditional approach** (hardcoded): Adding "Bowling" mode requires editing blueprint code, modifying choose blocks, updating all rooms.
|
||||
|
||||
**Convention-based approach** (this system): Create ONE helper via UI:
|
||||
1. Settings → Helpers → Create Text input
|
||||
2. Name: `input_text.adaptive_lighting_settings_bowling`
|
||||
3. Value: `{"behavior":"adaptive_lighting","manual_control":false,"led_color":148,"al_config":{...}}`
|
||||
4. Add "Bowling" to your room's mode dropdown
|
||||
5. Done! No blueprint changes, works immediately in all rooms.
|
||||
|
||||
---
|
||||
|
||||
## Occupancy Controlled Lights Blueprint
|
||||
|
||||
Reference in New Issue
Block a user