Simplicity of rule

I wants to create a rule one small rule were I want to check the same value tresholds for around 15 items, and to avoid into the rule the repeating item name with one small different into the item name like ItemName1 , ItemName2, if is possible to make some simplicity of specify name of my items into the rule with using such specification like : ItemName[1-2] , or ItemName*? Please advice. Thanks

Consider looking at the Threshold Alert rule template.

  1. Open Settings → Automation → Threshold Alert
  2. Click “Add”
  3. Open Settings-> Rules
  4. Click “+”
  5. Add an Action. Write what ever it is that you want to do using what ever language you choose. I recommend Blockly. You can use the “get context attribute” block to get a list of the Items that are null (nullItems) and a list of those that meet your threshold criteria (threshItems). You can loop through them or if you just want the labels of the Item a concatenated String with all the Item’s labels are also available.
  6. Return to Rules and click +. This time select “Threshold Alert” as the rule template. Here you will provide the Group containing all the Items, and other configuration information.

That’s it. All you have to mess with is what to do with the list of Items. Everything else is coded for you.

Ok, Thank your tip, will try soon,
anyway thanks for prompt response, this is relay appreciate.

put all items in one group.
Your rule will look like this:

rule "Threshold"
	Member of gThreshold received command
	if ((receivedCommand as Number) > 90) {
		logInfo("Threshold","Item {} exceeded threshold",

personally I would create a second item (OnOffType), link it to the same channel and use hysteresis profile. Then you receive an OK state once the threshold is exceeded and your rule doesn’t have to run hundreds of time per minute.
Furthermore you can also define a 2nd threshold when the item state becomes off again.

edit: ups, too slow…

Especially when working with thresholds and sensors the Items rarely receive commands. changed would be a better trigger than received command.

It can also cause problem if, for example, you have Dimmer Items. A Dimmer can receive a command INCREASE. What’s a rule like this supposed to do with that? Instead you want to run the rule and use the state of the Dimmer after the INCREASE command is processed and the Item enters the new state.

sure. The OP needs to look into the log where he can see if it is a state change or command. By quickly writing my post I ddn’t mention this.

As always - if you are replying to posts, the OP should consider first what you were writing.
And I mean this honestly