Fix input_text max length constraint for mode colors
- Add max: 255 parameter to adaptive_lighting_mode_colors input_text - Minify JSON to fit within Home Assistant's 100 character default limit - Remove adaptive_lighting_mode_settings input_text (too long, convert to comments) - Remove get_mode_settings script (no longer needed) - Fix template syntax: use states() instead of state_attr() for input_text values - Convert mode settings to reference documentation comments This fixes the 'Initial value length not in range 0-100' error from Home Assistant.
This commit is contained in:
@@ -67,7 +67,7 @@ action:
|
||||
current_index: "{{ available_modes.index(current_mode) }}"
|
||||
next_index: "{{ (current_index + 1) % (available_modes | length) }}"
|
||||
next_mode: "{{ available_modes[next_index] }}"
|
||||
mode_colors: "{{ state_attr('input_text.adaptive_lighting_mode_colors', 'state') | from_json }}"
|
||||
mode_colors: "{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}"
|
||||
next_color: "{{ mode_colors.get(next_mode, 170) }}"
|
||||
|
||||
# Change to next mode
|
||||
|
||||
Reference in New Issue
Block a user