fixed dimmer setup bug

master
Bernhard Trinnes 2018-06-12 22:50:59 +02:00 committed by Michael Zanetti
parent 6a5ff5f8cc
commit 12503a677d
1 changed files with 2 additions and 1 deletions

View File

@ -113,6 +113,7 @@ DeviceManager::DeviceSetupStatus DevicePluginUniPi::setupDevice(Device *device)
connect(dimmerSwitch, &DimmerSwitch::doublePressed, this, &DevicePluginUniPi::onDimmerSwitchDoublePressed);
connect(dimmerSwitch, &DimmerSwitch::dimValueChanged, this, &DevicePluginUniPi::onDimmerSwitchDimValueChanged);
m_dimmerSwitches.insert(dimmerSwitch, device);
return DeviceManager::DeviceSetupStatusSuccess;
}
return DeviceManager::DeviceSetupStatusFailure;
@ -336,7 +337,7 @@ DeviceManager::DeviceError DevicePluginUniPi::discoverDevices(const DeviceClassI
}
DeviceDescriptor descriptor(deviceClassId, "Dimmer switch", QString("Digital Input %1").arg(circuit));
ParamList parameters;
parameters.append(Param(digitalInputDigitalInputNumberParamTypeId, circuit));
parameters.append(Param(dimmerSwitchInputNumberParamTypeId, circuit));
descriptor.setParams(parameters);
deviceDescriptors.append(descriptor);
}