Merge PR #127: GenericElements: Fix toggle button writable state

pull/1/head
Jenkins 2019-07-22 12:17:14 +02:00
commit c28bf6a407
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ Device::DeviceError DevicePluginGenericElements::executeAction(Device *device, c
// Toggle Button
if (device->deviceClassId() == toggleButtonDeviceClassId ) {
if (action.actionTypeId() == toggleButtonStateActionTypeId) {
device->setStateValue(toggleButtonStateStateTypeId, !device->stateValue(toggleButtonStateStateTypeId).toBool());
device->setStateValue(toggleButtonStateStateTypeId, action.params().paramValue(toggleButtonStateActionStateParamTypeId).toBool());
return Device::DeviceErrorNoError;
}
return Device::DeviceErrorActionTypeNotFound;