When slaving these to bedding they lose the open/close functionality, that was my first attempt. I also suspect that slaving to anything else will also cause the open/close to stop working.
The reason is because the mesh has two parts, each labeled separately. Each of these are called by something else to provide the open or closed state. If you change the parts to both be the same then it appears not to work. Basically the open/closed states both show at the same time, all the time.