remove test actions

This commit is contained in:
Simon Stürz 2016-01-19 11:28:46 +01:00 committed by Michael Zanetti
parent 00a5188d05
commit 19bc5f7845
2 changed files with 14 additions and 44 deletions

View File

@ -217,22 +217,23 @@ void DevicePluginAwattar::guhTimer()
DeviceManager::DeviceError DevicePluginAwattar::executeAction(Device *device, const Action &action)
{
Q_UNUSED(device)
Q_UNUSED(action)
if (action.actionTypeId() == ledPowerActionTypeId) {
foreach (HeatPump *pump, m_heatPumps) {
if (!pump->reachable())
return DeviceManager::DeviceErrorHardwareNotAvailable;
// if (action.actionTypeId() == ledPowerActionTypeId) {
// foreach (HeatPump *pump, m_heatPumps) {
// if (!pump->reachable())
// return DeviceManager::DeviceErrorHardwareNotAvailable;
pump->setLed(action.param("led power").value().toBool());
}
} else if (action.actionTypeId() == sgModeActionTypeId) {
foreach (HeatPump *pump, m_heatPumps) {
if (!pump->reachable())
return DeviceManager::DeviceErrorHardwareNotAvailable;
// pump->setLed(action.param("led power").value().toBool());
// }
// } else if (action.actionTypeId() == sgModeActionTypeId) {
// foreach (HeatPump *pump, m_heatPumps) {
// if (!pump->reachable())
// return DeviceManager::DeviceErrorHardwareNotAvailable;
pump->setSgMode(action.param("sg-mode").value().toInt());
}
}
// pump->setSgMode(action.param("sg-mode").value().toInt());
// }
// }
return DeviceManager::DeviceErrorNoError;
}

View File

@ -114,37 +114,6 @@
],
"defaultValue": "0 - Invalid"
}
],
"actionTypes": [
{
"id": "5be2f57f-a22d-4766-856a-a31481bcf6d6",
"idName": "ledPower",
"name": "set led power",
"paramTypes": [
{
"name": "power",
"type": "bool"
}
]
},
{
"id": "03af6639-a815-4291-abbb-26fc81cdf740",
"idName": "sgMode",
"name": "set sg-mode",
"paramTypes": [
{
"name": "sg-mode",
"type": "QString",
"defaultValue": "1",
"allowedValues": [
"1",
"2",
"3",
"4"
]
}
]
}
]
}
]