Rules and Global Variable Question

Two week old newbie user. I have a question regarding Rules and device names.

I have Wallmote controllers in each room and hallways to control my Hue lights. Here's what I want to accomplish but I can't seem to put all of the pieces together:

User pushes the button to turn the lights On or Off
That starts the rule associated with that button
I want to use the name of the Wallmote to know which lights to turn on
The Rule would substitute part of a http command to send to my Hue API

Something like this: http://ip_addr/hue/%wallmote_name%/on

As an example, when the Rule runs for the office, it would send: http://ip_addr/hue/office/on

I could then have one Rule that takes care of all the Wallmotes. Currently, I have 12 different rules to accomplish this for 12 Wallmotes.

I've searched for some clues and while I've learned a lot and found some great rabbit holes, I didn't find anything to solve this for me.

Rules are free. So I would keep the twelve rules. However if you want to use the logic to make this decision you would use the %device% variable and the %value% variable. To determine which device and which action was used on said device.