GenericElements: Fix toggle button writable state
This commit is contained in:
parent
b5a1a84ab5
commit
c2ac4695e8
@ -83,7 +83,7 @@ Device::DeviceError DevicePluginGenericElements::executeAction(Device *device, c
|
|||||||
// Toggle Button
|
// Toggle Button
|
||||||
if (device->deviceClassId() == toggleButtonDeviceClassId ) {
|
if (device->deviceClassId() == toggleButtonDeviceClassId ) {
|
||||||
if (action.actionTypeId() == toggleButtonStateActionTypeId) {
|
if (action.actionTypeId() == toggleButtonStateActionTypeId) {
|
||||||
device->setStateValue(toggleButtonStateStateTypeId, !device->stateValue(toggleButtonStateStateTypeId).toBool());
|
device->setStateValue(toggleButtonStateStateTypeId, action.params().paramValue(toggleButtonStateActionStateParamTypeId).toBool());
|
||||||
return Device::DeviceErrorNoError;
|
return Device::DeviceErrorNoError;
|
||||||
}
|
}
|
||||||
return Device::DeviceErrorActionTypeNotFound;
|
return Device::DeviceErrorActionTypeNotFound;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user