I once made a advanced virtual device to show if a door/window is open, and how many. Maybe you can use it for now: