function setDeviceParam(device, paramName, newValue) {
  if (!device.params) {
    device.params = [];
  }
  const param = device.params.find((oneParam) => oneParam.name === paramName);
  if (param) {
    param.value = newValue;
  } else {
    device.params.push({
      name: paramName,
      value: newValue,
    });
  }
  return null;
}
@description Set Device param by name.
@param {object} device - Device Object to parse.
@param {string} paramName - The name of the param to get.
@param {string} newValue - The value to set.
@returns {null} Return when object was modified.
@example
setDeviceParam({
 params: [{ name: 'test', value: 1 }]
}, 'test', 'new-value');