From 96ab81f7aec8ba59a7ddbd942275f31d0aab1862 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Sun, 21 Dec 2025 18:27:46 -0800 Subject: [PATCH] Fix Adaptive mode not restoring lighting conditions The blueprint was unconditionally overriding use_defaults to 'current', preventing modes from specifying their own use_defaults value. This caused Adaptive mode (which uses use_defaults: 'configuration') to keep the current settings instead of resetting to configuration defaults. Modified the data template to conditionally add use_defaults: 'current' only when not already present in al_config, allowing modes like Adaptive to use their specified value while maintaining backward compatibility. --- blueprints/automation/apply_lighting_mode.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blueprints/automation/apply_lighting_mode.yaml b/blueprints/automation/apply_lighting_mode.yaml index 5aabd55..245770f 100644 --- a/blueprints/automation/apply_lighting_mode.yaml +++ b/blueprints/automation/apply_lighting_mode.yaml @@ -62,7 +62,12 @@ action: - service: adaptive_lighting.change_switch_settings target: entity_id: "{{ al_switch }}" - data: "{{ al_config | combine({'use_defaults': 'current'}) }}" + data: > + {% if 'use_defaults' not in al_config %} + {{ al_config | combine({'use_defaults': 'current'}) }} + {% else %} + {{ al_config }} + {% endif %} # Behavior: scene - conditions: "{{ behavior == 'scene' }}"