Update mock parent/child actions
This commit is contained in:
parent
b66a2a170c
commit
ac95880175
@ -302,14 +302,14 @@ DeviceManager::DeviceError DevicePluginMock::executeAction(Device *device, const
|
|||||||
}
|
}
|
||||||
return DeviceManager::DeviceErrorActionTypeNotFound;
|
return DeviceManager::DeviceErrorActionTypeNotFound;
|
||||||
} else if (device->deviceClassId() == mockParentDeviceClassId) {
|
} else if (device->deviceClassId() == mockParentDeviceClassId) {
|
||||||
if (action.actionTypeId() == mockParentBoolValueParentActionTypeId) {
|
if (action.actionTypeId() == mockParentBoolValueActionTypeId) {
|
||||||
device->setStateValue(mockParentBoolValueParentStateTypeId, action.param(mockParentBoolValueParentActionParamTypeId).value().toBool());
|
device->setStateValue(mockParentBoolValueStateTypeId, action.param(mockParentBoolValueActionParamTypeId).value().toBool());
|
||||||
return DeviceManager::DeviceErrorNoError;
|
return DeviceManager::DeviceErrorNoError;
|
||||||
}
|
}
|
||||||
return DeviceManager::DeviceErrorActionTypeNotFound;
|
return DeviceManager::DeviceErrorActionTypeNotFound;
|
||||||
} else if (device->deviceClassId() == mockChildDeviceClassId) {
|
} else if (device->deviceClassId() == mockChildDeviceClassId) {
|
||||||
if (action.actionTypeId() == mockChildBoolValueParentActionTypeId) {
|
if (action.actionTypeId() == mockChildBoolValueActionTypeId) {
|
||||||
device->setStateValue(mockChildBoolValueParentStateTypeId, action.param(mockChildBoolValueParentActionParamTypeId).value().toBool());
|
device->setStateValue(mockChildBoolValueStateTypeId, action.param(mockChildBoolValueActionParamTypeId).value().toBool());
|
||||||
return DeviceManager::DeviceErrorNoError;
|
return DeviceManager::DeviceErrorNoError;
|
||||||
}
|
}
|
||||||
return DeviceManager::DeviceErrorActionTypeNotFound;
|
return DeviceManager::DeviceErrorActionTypeNotFound;
|
||||||
|
|||||||
Reference in New Issue
Block a user