add light interface to simulated garageGate
This commit is contained in:
parent
430919f452
commit
4ca8a84ebc
@ -280,6 +280,11 @@ DeviceManager::DeviceError DevicePluginSimulation::executeAction(Device *device,
|
|||||||
qCDebug(dcSimulation()) << "Garage gate not moving";
|
qCDebug(dcSimulation()) << "Garage gate not moving";
|
||||||
return DeviceManager::DeviceErrorNoError;
|
return DeviceManager::DeviceErrorNoError;
|
||||||
}
|
}
|
||||||
|
if (action.actionTypeId() == garageGatePowerActionTypeId) {
|
||||||
|
bool power = action.param(garageGatePowerActionParamTypeId).value().toBool();
|
||||||
|
device->setStateValue(garageGatePowerStateTypeId, power);
|
||||||
|
return DeviceManager::DeviceErrorNoError;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device->deviceClassId() == rollerShutterDeviceClassId) {
|
if (device->deviceClassId() == rollerShutterDeviceClassId) {
|
||||||
|
|||||||
@ -263,7 +263,7 @@
|
|||||||
"displayName": "Garage gate",
|
"displayName": "Garage gate",
|
||||||
"createMethods": ["user"],
|
"createMethods": ["user"],
|
||||||
"deviceIcon": "Garage",
|
"deviceIcon": "Garage",
|
||||||
"interfaces": [ "garagegate" ],
|
"interfaces": [ "garagegate", "light" ],
|
||||||
"paramTypes": [ ],
|
"paramTypes": [ ],
|
||||||
"stateTypes": [
|
"stateTypes": [
|
||||||
{
|
{
|
||||||
@ -282,6 +282,16 @@
|
|||||||
"displayNameEvent": "Intermediate position changed",
|
"displayNameEvent": "Intermediate position changed",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "46543561-2690-4072-a6a3-795e1c4f49a8",
|
||||||
|
"name": "power",
|
||||||
|
"displayName": "Light power",
|
||||||
|
"displayNameEvent": "Light power changed",
|
||||||
|
"displayNameAction": "Set light power",
|
||||||
|
"type": "bool",
|
||||||
|
"defaultValue": false,
|
||||||
|
"writable": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"actionTypes": [
|
"actionTypes": [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user