Send recived value with sendCommand

I have multiple z-wave thermostats in my kitchen that can be controlled from BasicUI in OH2 or from the thermostats themselves. When changing the values directly on the thermostats I want the change to be transferred to all the other thermostats so I created a group “TempSetKitchen” that contains all the thermostats. I want to make a rule that changes all the thermostat setpoints when one thermostat is changed. I tried with this ruke:

rule ChangeAllSetpointsKitchen
when
  Item TempSetKitchen received command
then
  TempSetKitchen.members.forEach(item|item.sendCommand(receivedCommand.state))
end

This doesn’t work. I guess it is the “receivedCommand.state” that is wrong, because if I just add a number her the rule works and all thermostats are changed to this value if one thermostat is changed.

Can any body help with the right code?

receivedCommand is a variable, not an Item
See Rules WIKI

So it won’t have a .state, it will just be ON or “somestring” or 2.293 etc.
I think you should be able to use it directly in your sendCommand?