mirror of https://github.com/nymea/nymea.git
fix parsing of params
parent
7a63045999
commit
e4f3c9aba1
|
|
@ -345,11 +345,13 @@ JsonReply* DeviceHandler::AddConfiguredDevice(const QVariantMap ¶ms)
|
|||
{
|
||||
DeviceClassId deviceClass(params.value("deviceClassId").toString());
|
||||
QList<Param> deviceParams;
|
||||
foreach (const QString ¶mName, params.value("deviceParams").toMap().keys()) {
|
||||
foreach (const QVariant ¶mVariant, params.value("deviceParams").toList()) {
|
||||
QString paramName = paramVariant.toMap().keys().first();
|
||||
Param param(paramName);
|
||||
param.setValue(params.value("deviceParams").toMap().value(paramName));
|
||||
param.setValue(paramVariant.toMap().value(paramName));
|
||||
deviceParams.append(param);
|
||||
}
|
||||
|
||||
DeviceDescriptorId deviceDescriptorId(params.value("deviceDescriptorId").toString());
|
||||
DeviceId newDeviceId = DeviceId::createDeviceId();
|
||||
QPair<DeviceManager::DeviceError, QString> status;
|
||||
|
|
|
|||
Loading…
Reference in New Issue