From d75325198fd92310181df4b12d8a8b1539009c41 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 10 Oct 2025 16:52:49 -0400 Subject: [PATCH] Fix conditional errors --- supersensor.yaml | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/supersensor.yaml b/supersensor.yaml index 931c731..0e6a621 100644 --- a/supersensor.yaml +++ b/supersensor.yaml @@ -174,25 +174,24 @@ script: then: - if: condition: - lambda: 'return id(light_is_holding);' + lambda: 'return !id(light_is_holding);' then: - - stop: - - if: - condition: - - binary_sensor.is_on: supersensor_occupancy - - switch.is_on: enable_presence_led - then: - - light.turn_on: - id: output_led - brightness: 25% - red: 1 - green: 1 - blue: 1 - transition_length: 1s - else: - - light.turn_off: - id: output_led - transition_length: 1s + - if: + condition: + - binary_sensor.is_on: supersensor_occupancy + - switch.is_on: enable_presence_led + then: + - light.turn_on: + id: output_led + brightness: 25% + red: 1 + green: 1 + blue: 1 + transition_length: 1s + else: + - light.turn_off: + id: output_led + transition_length: 1s - id: pir_handler then: