[SOLVED] Making this rule generic

Nope. armed in your rule is just a string, the name of the Item you want. It doesn’t have a .state, it’s just a string not an Item.

There are at least two ways to get hold of the actual Item with that name (so that you can in turn get hold of its state),
You can select it from a group of which it is a member, as already shown in in this thread, or you can use a registry action.