Turning on a virtual switch where the specific switch depends on %device%

Consider the following scenario: I have a significant number of sensors such as

  • Water Sensor 01
  • Water Sensor 02, etc.

I also have matching virtual switches named

  • Water Sensor 01 Activated
  • Water Sensor 02 Activated, etc.

I'd like to construct a rule that says if any of the Water Sensors are activated, then turn on the corresponding virtual switch. In other words,

Select trigger event: Any of Water Sensor 01, Water Sensor 02 ... any wet
Select actions to run: On %device% Activated

OK, I know you can't do that. So what would be the simplest way to implement same? I could do it with x number of rules that are simple but numerous. Or in a single rule with x number of If/Then or a ridiculously nested If/Then/Else. A Case statement would be clean, but not available. But is there a clever way that looks a lot cleaner?

Creating a custom water sensor device driver that adds contact capabilities would work, I guess.

Background: While I ask the question in the abstract, I will offer the use case details. The goal is to have Alexa announce the specific location of the leak. One can't send a parameter as far as I know. I'm creating a virtual contact/switch for each specific thing I want Alexa to say. Note: I'm well aware of Echo Speaks which simplifies the hell out of this, but I'm trying to rule out user apps for the moment, and would prefer not to set up a second hub either.

I understand your use case. I don't have an eloquent solution for you but figured I'd share how I do it, just in case you didn't come up with something better.

I have a single rule with a conditional for each sensor (I've already lost you, haven't I?) that will turn a light on near any reported leak, send a notification to our phones, and send a notification to all of our Echo devices with the name of the sensor. The Echo notification uses a community driver that links to the NotifyMe Alexa skill.

This is not TTS. This is a notification complete with annoying tone and spinning yellow light that must be manually played. "Alexa, play notifications".

I can tell you, when my water heater gave up last year, this worked perfectly! And there isn't much of a chance of not waking when 12 Echo devices play the tone at once.

You can use clone to copy your first rule and then make the edits quite quickly. I can't think of any other way but separate rules or conditionals as you say.