From 1ba17ec62ddf8a46b4d82d2d2ed6b01b5919b443 Mon Sep 17 00:00:00 2001 From: Christian Fetzer Date: Wed, 6 Jul 2022 17:14:42 +0200 Subject: [PATCH] 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. --- somfytahoma/integrationpluginsomfytahoma.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/somfytahoma/integrationpluginsomfytahoma.cpp b/somfytahoma/integrationpluginsomfytahoma.cpp index cb2bc8b3..bce7216c 100644 --- a/somfytahoma/integrationpluginsomfytahoma.cpp +++ b/somfytahoma/integrationpluginsomfytahoma.cpp @@ -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"; }