Here is a door/window sensor that lets you know if there is unexpected activity in your home. The Onvis Thread-Enabled Door/Window Sensor works with HomePod mini and Apple TV for home automation. You get a notification when door or window status changes. You can also see past records on your mobile device.
These door sensors run for up to a year on a CR2450 cell battery. You can find out more here.