Trigger & Commands based on Semantic Tag

Hi,

I am setting up OH3 at the moment and like the concept of semantic tagging but struggle to use it in my rules.

Example:
I have tagged all my roller shutters as “Rollershutter”.
My expectation was that I can simply select the tag in the THEN configuration of the rule, e.g.
“THEN Send command OPEN to all ‘Control’ Points of Equipment tagged as ‘Rollershutter’”

In OH2 I created a group that contained the control items of all roller shutters, but with the semantic tags this shouldn’t be necessary anymore.

How should a Model and Rule in OH3 look like that controls a group of roller shutters, lights etc. at once?

Thanks,
Dirk

There is no Rollershutter tag in the model. Do you mean the Item’s type is Rollershutter (as discussed in Items | openHAB)?

No, that’s not possible. You’ll need to create a Group like you describe to do it like that. Alternatively you can create a Script Action and get all the Items that have a certain Semantic Tag and loop through those to send the command. But you’ll need to use the ItemRegistry to pull the Items (see the Associated Items DP for Rules DSL, in Python and JavaScript it’s ir). The method to call is ir.getItemsByTag(tagname).

The same as you did in OH 2.