mirror of https://github.com/nymea/nymea.git
some fixes
parent
3296d4b417
commit
dadffcb784
|
|
@ -285,11 +285,6 @@ static PyObject * PyThing_setStateValue(PyThing* self, PyObject* args)
|
|||
}
|
||||
|
||||
StateTypeId stateTypeId = StateTypeId(stateTypeIdStr);
|
||||
StateType stateType = self->thingClass->stateTypes().findById(stateTypeId);
|
||||
if (!stateType.isValid()) {
|
||||
PyErr_SetString(PyExc_ValueError, QString("No state type %1 in thing class %2").arg(stateTypeId.toString()).arg(self->thingClass->name()).toUtf8());
|
||||
return nullptr;
|
||||
}
|
||||
QVariant value = PyObjectToQVariant(valueObj);
|
||||
|
||||
if (self->thing != nullptr) {
|
||||
|
|
|
|||
|
|
@ -65,15 +65,17 @@
|
|||
"id": "248c5046-847b-44d0-ab7c-684ff79197dc",
|
||||
"name": "pyMockDiscoveryPairing",
|
||||
"displayName": "Python mock thing with discovery and pairing",
|
||||
"createMethods": ["discovery"],
|
||||
"createMethods": ["discovery", "user"],
|
||||
"setupMethod": "userAndPassword",
|
||||
"discoveryParamTypes": [
|
||||
{
|
||||
"id": "ef5f6b90-e9d8-4e77-a14d-6725cfb07116",
|
||||
"name": "resultCount",
|
||||
"displayName": "Result count",
|
||||
"type": "int",
|
||||
"defaultValue": 2
|
||||
"type": "uint",
|
||||
"defaultValue": 2,
|
||||
"minValue": 0,
|
||||
"maxValue": 20
|
||||
}
|
||||
],
|
||||
"paramTypes": [
|
||||
|
|
|
|||
Loading…
Reference in New Issue