Easy way to define Item Aliases (Labels)?

We control our devices usually with voice commands with Alexa and Google Assistant and sometimes those voice assistants, for some reason, do not understand the item name correctly but something else.
What I did to enhance the WAF is to create “Item Aliases” with the misheard names so that, even when the voice assistants understand something different to what we say, it still works.

An example is a lamp we call “The Pandas” because it has panda bears on them. When saying “xxx, turn on the pandas” Alexa in the past sometimes understood the item name as “Pandas”, “Panda”, “Panthers”, “Candle”, “Pandals”, “Pendant”, “Benders” -> frustrating!

So I created additional items in my items file with those alternate names, made them visible to the voice assistants and created rules to trigger the main item in case such an alias item was triggered -> works perfectly.

However I was wondering if there would be a better, easier solution than this without specific rules and defining multiple items?

Here is my code example with “The Pandas” lamp:

Switch	Outlet02			"The Pandas"		<switch_panda>	(Outlets)	["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02"		}
Switch	Outlet02_Alias1		"Pandas"										["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02"		}
Switch	Outlet02_Alias2		"Panthers"										["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02" 	}
Switch	Outlet02_Alias3		"The Panda"										["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02"		}
Switch	Outlet02_Alias4		"Candles"										["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02" 	}
Switch	Outlet02_Alias5		"Pandals"										["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02"		}
Switch  Outlet02_Alias6		"Pendant"										["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02" 	}
Switch  Outlet02_Alias7		"Benders"										["Switchable"]	{ channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02"		}
rule "Outlet02_Alias ON"
when
	Item Outlet02_Alias1 received update ON or Item Outlet02_Alias2 received update ON or Item Outlet02_Alias3 received update ON or Item Outlet02_Alias4 received update ON or Item Outlet02_Alias5 received update ON or Item Outlet02_Alias6 received update ON or Item Outlet02_Alias7 received update ON
then
	logInfo( "FILE", "RULE 'Outlet02_Alias ON' START")
	if(Outlet02.state != ON) {
		sendCommand(Outlet02, ON)
		postUpdate(Outlet02_Alias1, ON)
		postUpdate(Outlet02_Alias2, ON)
		postUpdate(Outlet02_Alias3, ON)
		postUpdate(Outlet02_Alias4, ON)
		postUpdate(Outlet02_Alias5, ON)
		postUpdate(Outlet02_Alias6, ON)
		postUpdate(Outlet02_Alias7, ON)
	}
	logInfo( "FILE", "RULE 'Outlet02_Alias ON' END")
end



rule "Outlet02_Alias OFF"
when
	Item Outlet02_Alias1 received update OFF or Item Outlet02_Alias2 received update OFF or Item Outlet02_Alias3 received update OFF or Item Outlet02_Alias4 received update OFF or Item Outlet02_Alias5 received update OFF or Item Outlet02_Alias6 received update OFF or Item Outlet02_Alias7 received update OFF
then
	logInfo( "FILE", "RULE 'Outlet02_Alias OFF' START")
	if(Outlet02.state != OFF) {
		sendCommand(Outlet02, OFF)
		postUpdate(Outlet02_Alias1, OFF)
		postUpdate(Outlet02_Alias2, OFF)
		postUpdate(Outlet02_Alias3, OFF)
		postUpdate(Outlet02_Alias4, OFF)
		postUpdate(Outlet02_Alias5, OFF)
		postUpdate(Outlet02_Alias6, OFF)
		postUpdate(Outlet02_Alias7, OFF)
	}
	logInfo( "FILE", "RULE 'Outlet02_Alias OFF' END")
end

The only shortcut I can think of is putting all the alias Items in a group, like g_Outlet02_aliases.

That would allow you to trigger a rule using
Member of g_Outlet02_aliases received update OFF
which saves some typing

Within the body of the rule, you could send a command to the group and it will auto-proliferate to all members. If autoupdate is on (default) that would cause state updates too.
However, the use of commands is likely to give you unwanted side effects.

What you can do is code to iterate through the group yourself and individually postUpdate each member Item.

This would ease maintenance - you can add or remove alias members of the group without changing the rules.

Now that is going to cause a storm of retriggering the rule … I think you need to trigger from
Member of g_Outlet02_aliases changed to OFF
which will still make a little storm but it will settle down.
It’d be very worthwhile to test if each Item is already in desired state before issuing a new postUpdate.

How about doing it this way; treating one “real” Item as special.

Group gOutlet02_aliases
Switch Outlet02 "The Pandas" <switch_panda> (Outlets) ["Switchable"] { channel="mqtt:topic:MQTTBroker:Outlet02:Outlet02" }
Switch Outlet02_Alias1 "Pandas" (g_Outlet02_aliases) ["Switchable"]
Switch Outlet02_Alias2 "Panthers" (g_Outlet02_aliases) ["Switchable"]

Only the ‘master’ gets a channel.
Only the aliases go in the group.
This asymmetry should minimize thrashing about

rule "invoke real command Outlet02"
when
   Member of gOutlet02_aliases received command
then
   Outlet02.sendCommand(receivedCommand)
end

rule "copy Outlet02 update"
when
   Item Outlet02 changed or
   System started    // to synch at boot time
then
   gOutlet02_aliases.members.forEach[ temp |
      temp.postUpdate(Outlet02.state)
   ]
end

Rossko57 has the solution to about multiple rules. I don’t think there is a way to do it and about the multiple items. Though I think there multiple items idea is a pretty clever one myself.

In Google Assistant, you can create a routine that responds to the different variants and does the one thing. For example, I have a routine that responds to “open garage door 1”, “open the left garage door” and so on to issue the command to open my main garage door. Maybe Alexa has something similar?