Mmwave trigger

Hello all
I’m using Node red on HAOS
I have a new mmwave sensor.I use this sensor to control temp, motion and light.

In the case of controlling lights, I can use the PIR to turn the light on fine.
And i want to keep the light on while i am there. so far do good

However i cannot seem to turn the light of

I have a binary sensor that detect movement and keep the light on.

I added a delay to the mix that connects to the current state node
And I would like to configure the binary sensor to cause the light to turn off
switch.everything_presence_one_761ef8_mmwave_sensor
if the sensor does not detect movement for 30 seconds i would like the light to turn off

I can not seem to configure the current state node to turn off the light
The entity tells me that it is a switch hence if the condition is off then it should turn of the light.

I do not know what I am missing to make this work

Thank you in advance for any help provided

Did you figure this out? I use Events: State. The top connector on the node is fired when the condition is true and bottom connector is for false - this alone was messing me up since I did not know that. So connect the top for turning on lights. And bottom to your wait until node before the turn off.

(in this example: the events state node is a single node not two)
Events state --(top)–> State filter → Light.turn_on
Events state --(bottom)–> wait until → light.turn_off

The “state filter” in my example is a current state check on the light. if the light is already on, I dont pass on the command - which really doesnt matter too much, I just wanted to be more precise with how I set mine up.

I use an apollo msr1 which gives me a state if something is moving in the radar target. So I set the Event State rules as If State is boolean true. State type is boolean. I like that the boolean operator converts all the various repsonses that could occur to true and false.

From the doc: State Typestring
Values: string|number|boolean
Default: string
Convert the state of the entity to the selected type. Boolean will be converted to true based on if the string is equal by default to (y|yes|true|on|home|open). Original value stored in msg.data.original_state