Let’s see - just as a mental exercise using Smart Lighting (though I’d normally use Stringify, and I know others would use WebCore - I just have fun creating with what’s there sometimes)
- Create a virtual switch for Bedroom Sensor - Switch BS (using Virtual Device Creator - BS for Bedroom Sensor)
In Smart Lighting create automations -
- If Bedroom Sensor senses motion then flip on Switch BS - turn off after x minutes of no motion (you decide - it’s like arming Toddler alarm - when does it disarm?)
- if Hallway sensor senses motion then send you alert (or do what you want) ONLY if Switch BS is on (look under “more options”)
Worth a try for a quick solution (And if it works I think it would even be local!)
(Of course it would fire if your toddler moved in bed and then you were in hallway, but that still is “both sensors within x time”).
[I just simplified after re-reading your use case]