How to mix item types in a group? Or go via proxy?

Folks,

I have a group (g_notPresent) which contains switch and dimmer items.
The switches I want to switch on (Easy - send ON) and the dimmer items I want to switch on but at a certain percentage - 25%.

The use-case is when I am not home I want to turn on certain lamps (ON/OFF) and other lights I want 25% brightness.

Is a proxy item and rule the only way for this? I can have two notPresent groups. On/Off and Percentage type. They could be called from a proxy item and rule for it which would be simple enough.

Wondering if there is a “short-cut” method for this?

thanks

Think about it like this, you’re basically wanting to send two commands: ON and percentage. So I don’t know how you can handle both commands even if we had a group that can handle both.

I got around the problem by using two different groups in a rule. It works but I don’t think it is the best way and will end u tangling myself up.

When I have time (and better understanding) I will try refactor it.

thanks

You could check the item type before issueing a command, if it’s a Switch sendCommand(ON), sendCommand(25) otherwise.

But you need a proxy item to trigger the rule and within it you need to walk each item of the group.

With two groups of separated item types you just can trigger the groups. (or use a proxy item and a rule to trigger both groups)

It depends which approach you like more. The first uses more complex rule logic, the second more complex group definition. The complexity has to be placed somewhere.

I believe he knows how to do that. His question was if there was a shortcut way