There are a few options for this:
-
Instead of virtual switch, use a custom device that has both Motion Sensor and Switch capabilities (Switch to turn on/off from basic rule; motion to trigger alexa routines) such as: [RELEASE] Virtual Switch Universal Device Type (uDTH) - good for Alexa, IFTTT, HSM, and other integrations
-
Use a virtual Motion device and RM (Rule Machine - a more complex built-in app for automations), which can call the custom Active/Inactive commands on the virtual device, instead of Basic Rule.
-
Instead of using Alexa routine to trigger the announcement, use [BETA] Echo Speaks V4 (a community/custom App by @tonesto7 ) to send the announcements directly.
Echo Speaks also has the ability to configure automations through something called "Actions", which looks like this: