Many years ago we gave our then-toddler an old digital camera to play with. Some time later, we looked at the pictures he took. We were horrified to find out that he took pictures of the outside of the house at night. As in, our toddler would unlock and open the front door, go outside (at night!), take pictures of the house, go back in, close and lock the door, and go back into his bed. I bought some wireless door sensors and created an automation where if the sensors are triggered between 10pm and 6am, the lights in our room would turn on to wake us up.
I expanded this later and today we have sensors on all doors/windows that kids can use to leave the house (we have 4 young kids). As it happens, these are the same doors/windows that burglars can use to enter the house, so this doubles as an alarm system (that we can activate when we leave the house and will notify us remotely if the sensors are triggered).
The best part is that with Home Assistant you are not locked into an app/ecosystem. Our door/window sensors are of a different brand than our lightbulbs, and we control everything from a single app.