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