Fix YAML block scalar causing template line-wrapping in blueprints
Replace block scalar (>-) with regular quoted strings for settings_entity templates. The block scalar was causing Home Assistant to wrap lines in the middle of the replace() function call, breaking the template parsing. This fixes: - LED color not updating in mode cycling automation - Mode settings not being applied in apply mode automation The templates now stay on a single line and parse correctly.
This commit is contained in:
@@ -72,8 +72,7 @@ action:
|
||||
current_index: "{{ available_modes.index(current_mode) }}"
|
||||
next_index: "{{ (current_index + 1) % (available_modes | length) }}"
|
||||
next_mode: "{{ available_modes[next_index] }}"
|
||||
next_mode_settings_entity: >-
|
||||
input_text.adaptive_lighting_settings_{{ next_mode | lower | replace(' ', '_') }}
|
||||
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) }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user