diff --git a/libnymea-core/integrations/python/pything.h b/libnymea-core/integrations/python/pything.h index 647a4998..18688eef 100644 --- a/libnymea-core/integrations/python/pything.h +++ b/libnymea-core/integrations/python/pything.h @@ -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) { diff --git a/plugins/pymock/integrationpluginpymock.json b/plugins/pymock/integrationpluginpymock.json index 39636d8a..52e7702e 100644 --- a/plugins/pymock/integrationpluginpymock.json +++ b/plugins/pymock/integrationpluginpymock.json @@ -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": [