Turn on something via motion sensor until triggered again

Hi, im using HA + Node Red for 2 months now and getting my hands dirty with some more complex automations.

I want to use a motion sensor (philips hue) to turn off the lights when I’m taking a nap on the couch.
Doing it like this, works well enough.

However, sometimes there is not enough motion to keep the lights off, so I want to walk through the motion sensor once, block the lights from coming on, and then only after I walk through the motion sensor again, have the lights come back on.

Basically, how do I create a state or something that is turned off until I trigger motion again?

Cheers S.

is something wrong with quoted text? Or Am I missing some piece?

Am I understanding correctly that sometimes the lights don’t turn on after you woke up from a nap? But I’m not getting the light part of the puzzle. Philips motion sensor is IR based

Most examples for motion triggered light work by having the sensor continuously being triggered and maybe delaying the signal a bit until you walk out of the room.

In my example, I reversed the motion sensor logic, so the lights turn off when I move to the couch.
however, when I lay there motionless, for longer than 5 min, the motion sensor turns the light on because it can’t make out the difference between me laying there motionless and me being not there.

So I thought I don’t want to be in the view of the sensor, I just want to walk through it (like a door) on my way to the couch, have the light permanently off and only when I walk back through the sensor, turn it back on. That way, I’m not dependent on continuous motion to retrigger the sensor to keep the lights off.

Understood now.
Now please describe also scenario when light should be turned on?
And maybe how your sensor is positioned. Under the couch or on the wall etc. Is it used only for this nap scenario of for something else. I’m asking because having already provided information I would remove turn_on service all to resolve your issue

For that, I would just use a light.toggle service call whenever it detects motion. You would have to place it to act as a light barrier though by decreasing its angle of view to a minimum.

thanks guys, i guess i thought a bit complicated. i taped down the sensor to narrow the field and used a toggle