Add double state to mock device -> close #289
This commit is contained in:
parent
8dc8531033
commit
82581ee569
@ -231,6 +231,12 @@ DeviceManager::DeviceError DevicePluginMock::executeAction(Device *device, const
|
|||||||
} else if (action.actionTypeId() == allowedValuesActionTypeId) {
|
} else if (action.actionTypeId() == allowedValuesActionTypeId) {
|
||||||
device->setStateValue(allowedValuesStateTypeId, action.param("allowed values").value().toString());
|
device->setStateValue(allowedValuesStateTypeId, action.param("allowed values").value().toString());
|
||||||
return DeviceManager::DeviceErrorNoError;
|
return DeviceManager::DeviceErrorNoError;
|
||||||
|
} else if (action.actionTypeId() == doubleActionTypeId) {
|
||||||
|
device->setStateValue(doubleStateTypeId, action.param("double value").value().toDouble());
|
||||||
|
return DeviceManager::DeviceErrorNoError;
|
||||||
|
} else if (action.actionTypeId() == boolActionTypeId) {
|
||||||
|
device->setStateValue(boolStateTypeId, action.param("bool value").value().toBool());
|
||||||
|
return DeviceManager::DeviceErrorNoError;
|
||||||
} else if (action.actionTypeId() == timeoutActionTypeId) {
|
} else if (action.actionTypeId() == timeoutActionTypeId) {
|
||||||
return DeviceManager::DeviceErrorAsync;
|
return DeviceManager::DeviceErrorAsync;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -289,6 +289,24 @@
|
|||||||
"String value 4"
|
"String value 4"
|
||||||
],
|
],
|
||||||
"writable": true
|
"writable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "53cd7c55-49b7-441b-b970-9048f20f0e2c",
|
||||||
|
"idName": "double",
|
||||||
|
"name": "double value",
|
||||||
|
"type": "double",
|
||||||
|
"defaultValue": 0.0,
|
||||||
|
"minValue": -100.0,
|
||||||
|
"maxValue": 100.0,
|
||||||
|
"writable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "e680f7a4-b39e-46da-be41-fa3170fe3768",
|
||||||
|
"idName": "bool",
|
||||||
|
"name": "bool value",
|
||||||
|
"type": "bool",
|
||||||
|
"defaultValue": false,
|
||||||
|
"writable": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"actionTypes": [
|
"actionTypes": [
|
||||||
@ -368,6 +386,24 @@
|
|||||||
"String value 4"
|
"String value 4"
|
||||||
],
|
],
|
||||||
"writable": true
|
"writable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "53cd7c55-49b7-441b-b970-9048f20f0e2c",
|
||||||
|
"idName": "double",
|
||||||
|
"name": "double value",
|
||||||
|
"type": "double",
|
||||||
|
"defaultValue": 0.0,
|
||||||
|
"minValue": -100.0,
|
||||||
|
"maxValue": 100.0,
|
||||||
|
"writable": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "e680f7a4-b39e-46da-be41-fa3170fe3768",
|
||||||
|
"idName": "bool",
|
||||||
|
"name": "bool value",
|
||||||
|
"type": "bool",
|
||||||
|
"defaultValue": false,
|
||||||
|
"writable": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"actionTypes": [
|
"actionTypes": [
|
||||||
|
|||||||
Reference in New Issue
Block a user