The smart home API does not have a way to uniquely identify each switch if you bundle them together as a single device. You should organize them as distinct devices, each with a unique device id, containing the OnOff
trait.
If your cloud service represents the device internally with a single identifier, you will need to generate unique ids to send Google. For example, you could append a suffix:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"agentUserId": "1836.15267389",
"devices": [
{
"id": "someswitch-1",
"type": "action.devices.types.SWITCH",
"traits": ["action.devices.traits.OnOff"],
...
},
{
"id": "someswitch-2",
"type": "action.devices.types.SWITCH",
"traits": ["action.devices.traits.OnOff"],
...
},
{
"id": "someswitch-3",
"type": "action.devices.types.SWITCH",
"traits": ["action.devices.traits.OnOff"],
...
}
]
}
}