From cfddf9145d45c1e5a3945db96bf729c1d3b78e9c Mon Sep 17 00:00:00 2001 From: John Ogle Date: Wed, 5 Nov 2025 17:24:38 -0800 Subject: [PATCH] Fix adaptive lighting switch validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds check for empty dict to prevent entity_id errors when adaptive lighting switch is not configured. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- occupancy_controlled_lights.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/occupancy_controlled_lights.yaml b/occupancy_controlled_lights.yaml index a224060..0d6b41a 100644 --- a/occupancy_controlled_lights.yaml +++ b/occupancy_controlled_lights.yaml @@ -96,7 +96,7 @@ action: sequence: - if: - condition: template - value_template: "{{ adaptive_lighting_switch != none }}" + value_template: "{{ adaptive_lighting_switch != none and adaptive_lighting_switch != {} }}" then: - action: adaptive_lighting.apply data: