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";
|
||||
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) {
|
||||
|
||||
@ -263,7 +263,7 @@
|
||||
"displayName": "Garage gate",
|
||||
"createMethods": ["user"],
|
||||
"deviceIcon": "Garage",
|
||||
"interfaces": [ "garagegate" ],
|
||||
"interfaces": [ "garagegate", "light" ],
|
||||
"paramTypes": [ ],
|
||||
"stateTypes": [
|
||||
{
|
||||
@ -282,6 +282,16 @@
|
||||
"displayNameEvent": "Intermediate position changed",
|
||||
"type": "bool",
|
||||
"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": [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user