Add generic ventilation thing

master
Michael Zanetti 2020-05-27 15:07:49 +02:00
parent 748e3614ba
commit 99b00d5ac8
2 changed files with 28 additions and 0 deletions

View File

@ -243,6 +243,14 @@ void IntegrationPluginGenericThings::executeAction(ThingActionInfo *info)
}
}
if (thing->thingClassId() == ventilationThingClassId) {
if (action.actionTypeId() == ventilationPowerActionTypeId) {
thing->setStateValue(ventilationPowerStateTypeId, action.param(ventilationPowerActionPowerParamTypeId).value());
info->finish(Thing::ThingErrorNoError);
return;
}
}
if (thing->thingClassId() == temperatureSensorThingClassId) {
if (action.actionTypeId() == temperatureSensorInputActionTypeId) {
double value = info->action().param(temperatureSensorInputActionInputParamTypeId).value().toDouble();

View File

@ -291,6 +291,26 @@
}
]
},
{
"id": "24af8dd3-ddf0-47f0-bf09-70fdfd8dceab",
"name": "ventilation",
"displayName": "Generic ventilation",
"createMethods": ["user"],
"interfaces": ["ventilation"],
"stateTypes": [
{
"id": "846711b7-ea5a-4c66-a267-001c60406509",
"name": "power",
"displayName": "Power",
"displayNameEvent": "Turned on or off",
"displayNameAction": "Turn on or off",
"type": "bool",
"defaultValue": false,
"writable": true,
"ioType": "digitalInput"
}
]
},
{
"id": "cf3d65db-6f68-457b-968c-cfb66cbd5311",
"name": "temperatureSensor",