From 6f612787a13355ce92aca358c10542cfdf622b7d Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sun, 21 Dec 2025 18:03:52 -0800 Subject: [PATCH] Update Inovelli mode cycling blueprint to use nested schema Replace reference to deleted adaptive_lighting_mode_colors entity with convention-based mode settings lookup. The blueprint now extracts led_color from each mode's nested JSON schema (input_text.adaptive_lighting_settings_{{mode}}) instead of using a separate color mapping entity. This fixes the error: "ValueError: Template error: from_json got invalid input 'unknown' when rendering template '{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}'" --- blueprints/automation/inovelli_mode_cycling.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blueprints/automation/inovelli_mode_cycling.yaml b/blueprints/automation/inovelli_mode_cycling.yaml index 3715dd4..a79a1a1 100644 --- a/blueprints/automation/inovelli_mode_cycling.yaml +++ b/blueprints/automation/inovelli_mode_cycling.yaml @@ -13,7 +13,8 @@ # Requirements: # - Inovelli Blue Dimmer (VZM31-SN) paired with Zigbee2MQTT # - input_select helper with available modes -# - packages/adaptive_lighting_global.yaml for mode colors +# - Mode settings entities following convention: input_text.adaptive_lighting_settings_{{mode}} +# - Each mode must have led_color field in nested JSON schema # # Reference: ADAPTIVE_LIGHTING_CONTROL_SYSTEM_DESIGN.md lines 144-182 @@ -71,8 +72,10 @@ action: current_index: "{{ available_modes.index(current_mode) }}" next_index: "{{ (current_index + 1) % (available_modes | length) }}" next_mode: "{{ available_modes[next_index] }}" - mode_colors: "{{ states('input_text.adaptive_lighting_mode_colors') | from_json }}" - next_color: "{{ mode_colors.get(next_mode, 170) }}" + next_mode_settings_entity: >- + input_text.adaptive_lighting_settings_{{ next_mode | lower | replace(' ', '_') }} + next_mode_settings: "{{ states(next_mode_settings_entity) | from_json }}" + next_color: "{{ next_mode_settings.led_color | default(170) }}" # Change to next mode - service: input_select.select_option