iPad guided access - switch off display at no more motion detection

Hello there!
I have an iPad Air 2 with iPadOS 15.7.1 installed. I have HA, a Philips Hue motion detector and an IP cam. I want to have the display alive until no more motion is detected. In guided access, there is only a specific time possible (for example 1 minute). Is it possible to turn the iPad display off, only if no more motion is detected at the Hue motion detector?