Implement Adaptive Lighting Mode System Phase 1 foundation
Add global mode definitions and config button mode cycling blueprint to establish the foundation for the adaptive lighting mode system. Changes: - Add input_text helpers for all 11 mode settings (Adaptive, Reading, Relaxing, Sleep, Theater, Party, Homework, Play, Cooking, Dining, Cleanup) with JSON configuration for brightness, color temp, and transition parameters - Store mode settings as individual input_text entities to work within Home Assistant's 255 character limit - Add usage notes for accessing mode settings in templates - Fix variable definition bug in inovelli_mode_cycling blueprint by adding zigbee2mqtt_device_name to variables section - Update README to reflect that PACKAGE_SETUP_GUIDE.md exists All YAML files validated with yamllint. JSON configuration validated with jq. Part of Phase 1 implementation from adaptive lighting mode system plan. Automated verification complete, ready for manual testing.
This commit is contained in:
@@ -27,7 +27,7 @@ A comprehensive mode-based lighting control system for Inovelli Blue Dimmer Swit
|
||||
|
||||
### Quick Start
|
||||
|
||||
See [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) for detailed setup instructions (coming soon).
|
||||
See [PACKAGE_SETUP_GUIDE.md](PACKAGE_SETUP_GUIDE.md) for detailed setup instructions.
|
||||
|
||||
**Prerequisites**:
|
||||
- Home Assistant with Adaptive Lighting integration installed
|
||||
|
||||
@@ -62,6 +62,7 @@ trigger:
|
||||
action:
|
||||
- variables:
|
||||
mode_select: !input mode_input_select
|
||||
zigbee2mqtt_device_name: !input zigbee2mqtt_device_name
|
||||
current_mode: "{{ states(mode_select) }}"
|
||||
available_modes: "{{ state_attr(mode_select, 'options') }}"
|
||||
current_index: "{{ available_modes.index(current_mode) }}"
|
||||
|
||||
@@ -28,27 +28,87 @@ input_text:
|
||||
"Play":148,"Cooking":42,"Dining":21,"Cleanup":170}
|
||||
|
||||
# =============================================================================
|
||||
# MODE SETTINGS REFERENCE
|
||||
# MODE SETTINGS DEFINITIONS
|
||||
# =============================================================================
|
||||
# Standard settings for each mode are documented below
|
||||
# These are NOT stored as entities - they are hardcoded in each room's automation
|
||||
#
|
||||
# Adaptive: Standard AL following sun (use_defaults: configuration)
|
||||
# Reading: min_brightness 80, max_brightness 100, min_color_temp 4500, max_color_temp 5500
|
||||
# Relaxing: min_brightness 20, max_brightness 40, min_color_temp 2000, max_color_temp 2500
|
||||
# Sleep: min_brightness 1, max_brightness 5, min_color_temp 2000, sleep_rgb_color [255,50,0]
|
||||
# Theater: min_brightness 5, max_brightness 20, min_color_temp 3000, max_color_temp 4000
|
||||
# Party: min_brightness 60, max_brightness 90, min_color_temp 3500, max_color_temp 4500
|
||||
# Homework: min_brightness 85, max_brightness 100, min_color_temp 4000, max_color_temp 5000
|
||||
# Play: min_brightness 60, max_brightness 85, min_color_temp 4000, max_color_temp 5000
|
||||
# Cooking: min_brightness 90, max_brightness 100, min_color_temp 4500, max_color_temp 5500
|
||||
# Dining: min_brightness 40, max_brightness 70, min_color_temp 2500, max_color_temp 3500
|
||||
# Cleanup: min_brightness 80, max_brightness 100, min_color_temp 4000, max_color_temp 5000
|
||||
# Each mode has its own input_text helper to stay within 255 char limit
|
||||
# Room automations read these to apply appropriate AL settings
|
||||
# =============================================================================
|
||||
|
||||
# Adaptive mode - uses default AL configuration
|
||||
adaptive_lighting_settings_adaptive:
|
||||
name: "AL Settings: Adaptive"
|
||||
max: 255
|
||||
initial: '{"use_defaults":"configuration"}'
|
||||
|
||||
# Reading mode - bright, cool white
|
||||
adaptive_lighting_settings_reading:
|
||||
name: "AL Settings: Reading"
|
||||
max: 255
|
||||
initial: '{"min_brightness":80,"max_brightness":100,"min_color_temp":4500,"max_color_temp":5500,"transition":2}'
|
||||
|
||||
# Relaxing mode - dim, warm white
|
||||
adaptive_lighting_settings_relaxing:
|
||||
name: "AL Settings: Relaxing"
|
||||
max: 255
|
||||
initial: '{"min_brightness":20,"max_brightness":40,"min_color_temp":2000,"max_color_temp":2500,"transition":5}'
|
||||
|
||||
# Sleep mode - very dim red/amber
|
||||
adaptive_lighting_settings_sleep:
|
||||
name: "AL Settings: Sleep"
|
||||
max: 255
|
||||
initial: '{"min_brightness":1,"max_brightness":5,"min_color_temp":2000,"sleep_rgb_color":[255,50,0],"transition":2}'
|
||||
|
||||
# Theater mode - dim, cool for movies
|
||||
adaptive_lighting_settings_theater:
|
||||
name: "AL Settings: Theater"
|
||||
max: 255
|
||||
initial: '{"min_brightness":5,"max_brightness":20,"min_color_temp":3000,"max_color_temp":4000,"transition":3}'
|
||||
|
||||
# Party mode - bright, dynamic for socializing
|
||||
adaptive_lighting_settings_party:
|
||||
name: "AL Settings: Party"
|
||||
max: 255
|
||||
initial: '{"min_brightness":60,"max_brightness":90,"min_color_temp":3500,"max_color_temp":4500,"transition":1}'
|
||||
|
||||
# Homework mode - bright, neutral for focus
|
||||
adaptive_lighting_settings_homework:
|
||||
name: "AL Settings: Homework"
|
||||
max: 255
|
||||
initial: '{"min_brightness":85,"max_brightness":100,"min_color_temp":4000,"max_color_temp":5000,"transition":2}'
|
||||
|
||||
# Play mode - medium bright, energizing
|
||||
adaptive_lighting_settings_play:
|
||||
name: "AL Settings: Play"
|
||||
max: 255
|
||||
initial: '{"min_brightness":60,"max_brightness":85,"min_color_temp":4000,"max_color_temp":5000,"transition":2}'
|
||||
|
||||
# Cooking mode - bright, cool task lighting
|
||||
adaptive_lighting_settings_cooking:
|
||||
name: "AL Settings: Cooking"
|
||||
max: 255
|
||||
initial: '{"min_brightness":90,"max_brightness":100,"min_color_temp":4500,"max_color_temp":5500,"transition":1}'
|
||||
|
||||
# Dining mode - medium, warm for meals
|
||||
adaptive_lighting_settings_dining:
|
||||
name: "AL Settings: Dining"
|
||||
max: 255
|
||||
initial: '{"min_brightness":40,"max_brightness":70,"min_color_temp":2500,"max_color_temp":3500,"transition":3}'
|
||||
|
||||
# Cleanup mode - bright, standard for cleaning
|
||||
adaptive_lighting_settings_cleanup:
|
||||
name: "AL Settings: Cleanup"
|
||||
max: 255
|
||||
initial: '{"min_brightness":80,"max_brightness":100,"min_color_temp":4000,"max_color_temp":5000,"transition":1}'
|
||||
|
||||
# Manual Override mode - pauses AL completely (no settings needed)
|
||||
|
||||
# =============================================================================
|
||||
# USAGE NOTES
|
||||
# =============================================================================
|
||||
# To access mode colors in templates:
|
||||
# {% set colors = states('input_text.adaptive_lighting_mode_colors') | from_json %}
|
||||
# {{ colors.get('Reading', 170) }}
|
||||
#
|
||||
# To access mode settings in templates:
|
||||
# {% set settings = states('input_text.adaptive_lighting_settings_reading') | from_json %}
|
||||
# {{ settings.min_brightness }}
|
||||
|
||||
Reference in New Issue
Block a user