removed unsupported control features
This commit is contained in:
parent
3b1d8bc565
commit
0a63787cad
@ -106,13 +106,11 @@ IntegrationPluginHomeConnect::IntegrationPluginHomeConnect()
|
|||||||
m_endTimerStateTypeIds.insert(dryerThingClassId, dryerEndTimeStateTypeId);
|
m_endTimerStateTypeIds.insert(dryerThingClassId, dryerEndTimeStateTypeId);
|
||||||
m_endTimerStateTypeIds.insert(dishwasherThingClassId, dishwasherEndTimeStateTypeId);
|
m_endTimerStateTypeIds.insert(dishwasherThingClassId, dishwasherEndTimeStateTypeId);
|
||||||
|
|
||||||
m_startActionTypeIds.insert(ovenThingClassId, ovenStartActionTypeId);
|
|
||||||
m_startActionTypeIds.insert(washerThingClassId, washerStartActionTypeId);
|
m_startActionTypeIds.insert(washerThingClassId, washerStartActionTypeId);
|
||||||
m_startActionTypeIds.insert(dryerThingClassId, dryerStartActionTypeId);
|
m_startActionTypeIds.insert(dryerThingClassId, dryerStartActionTypeId);
|
||||||
m_startActionTypeIds.insert(dishwasherThingClassId, dishwasherStartActionTypeId);
|
m_startActionTypeIds.insert(dishwasherThingClassId, dishwasherStartActionTypeId);
|
||||||
m_startActionTypeIds.insert(coffeeMakerThingClassId, coffeeMakerStartActionTypeId);
|
m_startActionTypeIds.insert(coffeeMakerThingClassId, coffeeMakerStartActionTypeId);
|
||||||
|
|
||||||
m_stopActionTypeIds.insert(ovenThingClassId, ovenStopActionTypeId);
|
|
||||||
m_stopActionTypeIds.insert(washerThingClassId, washerStopActionTypeId);
|
m_stopActionTypeIds.insert(washerThingClassId, washerStopActionTypeId);
|
||||||
m_stopActionTypeIds.insert(dryerThingClassId, dryerStopActionTypeId);
|
m_stopActionTypeIds.insert(dryerThingClassId, dryerStopActionTypeId);
|
||||||
m_stopActionTypeIds.insert(dishwasherThingClassId, dishwasherStopActionTypeId);
|
m_stopActionTypeIds.insert(dishwasherThingClassId, dishwasherStopActionTypeId);
|
||||||
@ -336,21 +334,7 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info)
|
|||||||
m_pendingActions.remove(requestId);
|
m_pendingActions.remove(requestId);
|
||||||
});
|
});
|
||||||
} else if (thing->thingClassId() == ovenThingClassId) {
|
} else if (thing->thingClassId() == ovenThingClassId) {
|
||||||
if (action.actionTypeId() == ovenStartActionTypeId) {
|
//Oven control is only allowed with an additional agreement with home connect
|
||||||
if (!m_selectedProgram.contains(thing)) {
|
|
||||||
homeConnect->getProgramsSelected(haid);
|
|
||||||
return info->finish(Thing::ThingErrorMissingParameter, tr("Please select a program first"));
|
|
||||||
}
|
|
||||||
QUuid requestId;
|
|
||||||
HomeConnect::Option startTime;
|
|
||||||
startTime.key = "BSH.Common.Option.StartInRelative";
|
|
||||||
startTime.unit = "seconds";
|
|
||||||
startTime.value = action.param(dishwasherStartActionStartTimeParamTypeId).value().toInt() * 60;
|
|
||||||
requestId = homeConnect->startProgram(haid, m_selectedProgram.value(thing), QList<HomeConnect::Option>() << startTime);
|
|
||||||
connect(info, &ThingActionInfo::aborted, [requestId, this] {
|
|
||||||
m_pendingActions.remove(requestId);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (thing->thingClassId() == coffeeMakerThingClassId) {
|
} else if (thing->thingClassId() == coffeeMakerThingClassId) {
|
||||||
if (action.actionTypeId() == coffeeMakerTemperatureActionTypeId) {
|
if (action.actionTypeId() == coffeeMakerTemperatureActionTypeId) {
|
||||||
QUuid requestId;
|
QUuid requestId;
|
||||||
@ -415,11 +399,7 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (thing->thingClassId() == fridgeThingClassId) {
|
} else if (thing->thingClassId() == fridgeThingClassId) {
|
||||||
if (action.actionTypeId() == fridgeFridgeTemperatureSettingActionTypeId) {
|
//Fridge control is only allowed with an additional agreement with home connect
|
||||||
//TODO
|
|
||||||
} else if (action.actionTypeId() == fridgeFreezerTemperatureSettingActionTypeId) {
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
} else if (thing->thingClassId() == dishwasherThingClassId) {
|
} else if (thing->thingClassId() == dishwasherThingClassId) {
|
||||||
if (action.actionTypeId() == dishwasherStartActionTypeId) {
|
if (action.actionTypeId() == dishwasherStartActionTypeId) {
|
||||||
if (!m_selectedProgram.contains(thing)) {
|
if (!m_selectedProgram.contains(thing)) {
|
||||||
@ -432,7 +412,7 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info)
|
|||||||
startTime.unit = "seconds";
|
startTime.unit = "seconds";
|
||||||
startTime.value = action.param(dishwasherStartActionStartTimeParamTypeId).value().toInt() * 60;
|
startTime.value = action.param(dishwasherStartActionStartTimeParamTypeId).value().toInt() * 60;
|
||||||
requestId = homeConnect->startProgram(haid, m_selectedProgram.value(thing), QList<HomeConnect::Option>() << startTime);
|
requestId = homeConnect->startProgram(haid, m_selectedProgram.value(thing), QList<HomeConnect::Option>() << startTime);
|
||||||
m_pendingActions.insert(requestId, info);
|
m_pendingActions.insert(requestId, info);
|
||||||
connect(info, &ThingActionInfo::aborted, [requestId, this] {
|
connect(info, &ThingActionInfo::aborted, [requestId, this] {
|
||||||
m_pendingActions.remove(requestId);
|
m_pendingActions.remove(requestId);
|
||||||
});
|
});
|
||||||
@ -484,6 +464,12 @@ void IntegrationPluginHomeConnect::executeAction(ThingActionInfo *info)
|
|||||||
m_pendingActions.remove(requestId);
|
m_pendingActions.remove(requestId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (thing->thingClassId() == cleaningRobotThingClassId) {
|
||||||
|
//Home Connect: Program support is planned to be released in 2020.
|
||||||
|
} else if (thing->thingClassId() == cookTopThingClassId) {
|
||||||
|
//Home Connect: Program support is planned to be released in 2020.
|
||||||
|
} else if (thing->thingClassId() == hoodThingClassId) {
|
||||||
|
//Home Connect: Program support is planned to be released in 2020.
|
||||||
} else {
|
} else {
|
||||||
Q_ASSERT_X(false, "executeAction", QString("Unhandled thingClassId: %1").arg(thing->thingClassId().toString()).toUtf8());
|
Q_ASSERT_X(false, "executeAction", QString("Unhandled thingClassId: %1").arg(thing->thingClassId().toString()).toUtf8());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,7 +151,6 @@
|
|||||||
"defaultValue": 180,
|
"defaultValue": 180,
|
||||||
"minValue": 30,
|
"minValue": 30,
|
||||||
"maxValue": 250,
|
"maxValue": 250,
|
||||||
"writable": true,
|
|
||||||
"unit": "DegreeCelsius",
|
"unit": "DegreeCelsius",
|
||||||
"type": "int"
|
"type": "int"
|
||||||
},
|
},
|
||||||
@ -172,8 +171,7 @@
|
|||||||
"displayNameAction": "Set duration",
|
"displayNameAction": "Set duration",
|
||||||
"defaultValue": 0,
|
"defaultValue": 0,
|
||||||
"unit": "Minutes",
|
"unit": "Minutes",
|
||||||
"type": "int",
|
"type": "int"
|
||||||
"writable": true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "85a333dc-0e0b-454c-9c9a-d14dd6484275",
|
"id": "85a333dc-0e0b-454c-9c9a-d14dd6484275",
|
||||||
@ -201,29 +199,6 @@
|
|||||||
"type": "QString"
|
"type": "QString"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"actionTypes": [
|
|
||||||
{
|
|
||||||
"id": "c7b9b467-6ac5-4870-8874-da977fa30987",
|
|
||||||
"name": "start",
|
|
||||||
"displayName": "Start",
|
|
||||||
"paramTypes": [
|
|
||||||
{
|
|
||||||
"id": "27de74b5-265a-4c9f-bd3e-f58ab5c81a1f",
|
|
||||||
"name": "startTime",
|
|
||||||
"displayName": "Start time",
|
|
||||||
"defaultValue": 0,
|
|
||||||
"minValue": 0,
|
|
||||||
"type": "int",
|
|
||||||
"unit": "Minutes"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "0467aeed-b275-4e5f-a288-1a600465b582",
|
|
||||||
"name": "stop",
|
|
||||||
"displayName": "Stop"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"eventTypes": [
|
"eventTypes": [
|
||||||
{
|
{
|
||||||
"id": "aa3372df-5be7-499a-8246-9c4319a2c080",
|
"id": "aa3372df-5be7-499a-8246-9c4319a2c080",
|
||||||
@ -737,7 +712,6 @@
|
|||||||
"type": "int",
|
"type": "int",
|
||||||
"minValue": 2,
|
"minValue": 2,
|
||||||
"maxValue": 8,
|
"maxValue": 8,
|
||||||
"writable": true,
|
|
||||||
"unit": "DegreeCelsius"
|
"unit": "DegreeCelsius"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -761,7 +735,6 @@
|
|||||||
"type": "int",
|
"type": "int",
|
||||||
"minValue": -24,
|
"minValue": -24,
|
||||||
"maxValue": -16,
|
"maxValue": -16,
|
||||||
"writable": true,
|
|
||||||
"unit": "DegreeCelsius"
|
"unit": "DegreeCelsius"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user