# packages/adaptive_lighting_global.yaml # # Global constants for Adaptive Lighting Mode System # This file is shared across all rooms and should be version controlled. # # To use: Place in config/packages/ directory # Enable packages in configuration.yaml: # homeassistant: # packages: !include_dir_named packages/ # ============================================================================= # MODE COLOR MAPPINGS (ROYGBIV Scheme) # ============================================================================= # These colors are used for LED feedback on Inovelli switches # Values are hue (0-255) for Zigbee2MQTT ledColorWhenOn/Off parameter # # Reference ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 112-131 # ============================================================================= input_text: adaptive_lighting_mode_colors: name: "AL Mode Color Mappings (JSON)" max: 255 # JSON minified to fit in 255 char limit initial: >- {"Adaptive":170,"Reading":42,"Relaxing":21,"Sleep":0, "Manual Override":212,"Theater":127,"Party":234,"Homework":85, "Play":148,"Cooking":42,"Dining":21,"Cleanup":170} # ============================================================================= # MODE SETTINGS REFERENCE # ============================================================================= # 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 # ============================================================================= # ============================================================================= # HELPER SCRIPTS # ============================================================================= script: get_mode_color: alias: "Get LED Color for Mode" description: "Returns the LED color value (0-255) for a given mode name" fields: mode: description: "Mode name (e.g., 'Reading', 'Sleep')" example: "Reading" sequence: - stop: "Color retrieved" response_variable: "color" response: color: >- {% set colors = states('input_text.adaptive_lighting_mode_colors') | from_json %} {{ colors.get(mode, 170) }}