Same rule for different items and different triggers

Hi,
I am traing to control my blinds with preset move orders.

The blinds can be tiltest but are controlled by one single motor for up and down.

I would like to make a preset with has the blinds fully down but opened.
I should work like this.

Item 100% wait for certain amount of time. Item 99%

Same for different settings like 75%

I would need about 6 rules for all the stinngs.

Now the difficult part. I have 11 different blinds and do not want to make 66 rules.
Can i somehow use variabled to accomplish this.

Additionaly complicating everythins is that the triggering item is not the item receiving the command.

Can anyone of you point me in the right direction?

Not sure, if I understand your problem. Instead of linking your GUI widget to a particular item you can start a rule and provide parameters to that rule. In this case it would be the item’s name and command you want to control (e.g. itemName, itemCommand).
In your rule you define that parameter in the props section which you can now access under props.itemName.
This way you can send commands from a rule to items in a generic way

items[props.itemName].sendCommand(props.itemCommand)

Thank you for your help…
I understand that it is a bit confusing.

I have a switch which is called 75% open.
If i turn on this switch the rule it checks the positions of the blind item and then puts it to 75%. The positioning of the flaps is different if coming from above or below thats why it needs to check the position. To have the flaps open it first needs to be greater than 75% and then set to 75%.

The rule itself works.

I just need help with triggering the rule with different switches and then using different items.
If triggered by switch 1 use blind 2
if triggered by switch 2 use blind 2

Why don’t you post your current rule, so we can have a better idea and can give more specific suggestions.

You could put all your triggering switches into group and then configure rule trigger to be “a member of an item group receives a command

If you keep fixed naming pattern for switches and blind position items you can then decide based on triggering item name.

Something like this:

Switch item name: BlindsKitchen_Switch_75
Blinds item name: BlindsKitchen
var blindsItem = event.itemName.split("_Switch_")[0];
var blindsCommand = event.itemName.split("_Switch_")[1];

If you use Dimmer item as trigger then you just need one trigger item for one blinds:

Dimmer item name: BlindsKitchen_Trigger
Blinds item name: BlindsKitchen
var blindsItem = event.itemName.split("_Trigger")[0];
var blindsCommand = event.itemCommand.toString();

This is exactly the sort of use case where I employ custom metadata. All of my remote switches and buttons use one generic rule (and they are as @djal suggested members of one group so that the rule trigger is simply Member of group changed).

The rule then gets the appropriate metadata from the item that triggered the rule and that metadata sets the target item to command and the command that is sent based on the command that triggered the rule.

For example, here’s the metadata for a switch in my living room that can support up and down short, long, and double presses (which each result in the state being changed to some number):

config:
  "1.0":
    command: ON
    device: Outlet_LivingRoomLamp_OnOff
  "1.1":
    command: ON
    device: Switch_LivingRoomLight_OnOff
  "2.0":
    command: OFF
    device: Outlet_LivingRoomLamp_OnOff
  "2.1":
    command: OFF
    device: Switch_LivingRoomLight_OnOff
  "1.3":
    command: ON
    device: Switch_FrontHallLight_OnOff
  "2.3":
    command: OFF
    device: Switch_FrontHallLight_OnOff

So if that switch receives an up long press, it triggers the rule with a state change to 1.1. The rule accesses the metadata, looks up state 1.1 and has the information to send an ON command to the living room light.

Adding a new remote control to the system is a simply as adding the remote’s state Item to the group and configuring the metadata for it.