somfytahoma: Fix actions for roller shutters

The assumption that all IO roller shutters support the
setClosureAndLinearSpeed action was incorrect, only the RS100 IO does.

In order to maximize compatibility, use setClosure instead.

For the moment this means RS100 IO motors don't move in silent mode
anymore until we find a solution to differentiate them from others.
master
Christian Fetzer 2022-07-06 17:14:42 +02:00
parent b4aeeefa48
commit 1ba17ec62d
1 changed files with 4 additions and 6 deletions

View File

@ -549,14 +549,12 @@ void IntegrationPluginSomfyTahoma::executeAction(ThingActionInfo *info)
if (info->thing()->thingClassId() == rollershutterThingClassId) {
deviceUrl = info->thing()->paramValue(rollershutterThingDeviceUrlParamTypeId).toString();
if (info->action().actionTypeId() == rollershutterPercentageActionTypeId) {
actionName = "setClosureAndLinearSpeed";
actionParameters = { info->action().param(rollershutterPercentageActionPercentageParamTypeId).value().toInt(), "lowspeed" };
actionName = "setClosure";
actionParameters = { info->action().param(rollershutterPercentageActionPercentageParamTypeId).value().toInt() };
} else if (info->action().actionTypeId() == rollershutterOpenActionTypeId) {
actionName = "setClosureAndLinearSpeed";
actionParameters = { 0, "lowspeed" };
actionName = "open";
} else if (info->action().actionTypeId() == rollershutterCloseActionTypeId) {
actionName = "setClosureAndLinearSpeed";
actionParameters = { 100, "lowspeed" };
actionName = "close";
} else if (info->action().actionTypeId() == rollershutterStopActionTypeId) {
actionName = "stop";
}