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:
@@ -40,8 +40,7 @@ variables:
|
||||
al_switch: !input adaptive_lighting_switch
|
||||
led_entity: !input led_color_entity
|
||||
mode: "{{ states(mode_select) }}"
|
||||
settings_entity: >-
|
||||
input_text.adaptive_lighting_settings_{{ mode | lower | replace(' ', '_') }}
|
||||
settings_entity: "input_text.adaptive_lighting_settings_{{ mode | lower | replace(' ', '_') }}"
|
||||
settings: "{{ states(settings_entity) | from_json }}"
|
||||
behavior: "{{ settings.behavior | default('adaptive_lighting') }}"
|
||||
manual_control: "{{ settings.manual_control | default(false) }}"
|
||||
|
||||
Reference in New Issue
Block a user