No, this is incorrect - real/physical devices will not function if they are assigned virtual drivers. Here is what you do:
- Create a virtual contact sensor using the built-in driver "Virtual Contact Sensor". You do not need to install the driver posted earlier in this thread. You'll have to give this contact sensor a name, and expose it to the Amazon Echo Skill, so it will show up in your Alexa app.
- Using Rule Machine, create an automation like the following:
Here is what this automation does. When the real leak sensor is wet, it sets the virtual contact sensor to be "open", and when the real leak sensor is dry, it sets the virtual contact sensor to be closed. You can use the commands open() and close() in Rule Machine by "using a Custom Action" on the contact sensor.
No.
And this brings me to why I don't understand what you are doing. Hubitat has extensive Notification capabilities. Notifications can be sent to the phone app (built-in integration), to Pushover (built-in integration), to SMS using Twilio (built-in integration) or Plivo (integration by @ritchierich), by email using two separate integrations written by @erktrek and @kahn-hubitat. These email integrations can also be used for email2SMS.
All these methods of notification, which are native to Hubitat, can be used to notify based on any device capability or attribute, including battery level. I personally prefer to receive my notifications by SMS. Here's a tiny sample of the SMS messages that I received yesterday from my hubs, including status of Hubitat-paired garden hose valves, my garage door, the Housekeeper's lock code being used and my presence.
When Hubitat offers such as rich plethora of notification options, and reporting capabilities, why limit yourself to the small slivers of information provided by Alexa?