private async Task <ActionResult> Edit(EditDevicePropertiesModel model)
        {
            if (model != null)
            {
                var device = await _deviceLogic.GetDeviceAsync(model.DeviceId);

                if (device != null)
                {
                    _deviceLogic.ApplyDevicePropertyValueModels(device, model.DevicePropertyValueModels);
                    await _deviceLogic.UpdateDeviceAsync(device);
                }
            }

            return(RedirectToAction("Index"));
        }