My idea for bedroom better presence detection


My idea is basically to have a second hallway PIR sensor that must turn on within 5 seconds of the bedroom PIR turning off. That will set a timer running to turn my AC off after 10 minutes. If my bedroom PIR turns on within those 10 minutes, it stops the automation.
This is my node red setup in home assistant.

Havent yet implemented it but I thought Ide share and see if this makes sense…