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:
2025-12-20 14:38:21 -08:00
parent 2cb34c7c9f
commit ea426e56ef
2 changed files with 22 additions and 125 deletions

View File

@@ -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