From 0c290fd475068babd8a95c91768257af9f5ef83d Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 22 Oct 2021 21:03:06 +0200 Subject: [PATCH] Shelly: Fix switch settings for second channel --- shelly/integrationpluginshelly.cpp | 2 +- shelly/integrationpluginshelly.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shelly/integrationpluginshelly.cpp b/shelly/integrationpluginshelly.cpp index b0fca4bf..60569ca9 100644 --- a/shelly/integrationpluginshelly.cpp +++ b/shelly/integrationpluginshelly.cpp @@ -1519,7 +1519,7 @@ void IntegrationPluginShelly::setupShellyChild(ThingSetupInfo *info) url.setScheme("http"); url.setHost(address); url.setPort(80); - url.setPath("/settings/relay/0"); + url.setPath(QString("/settings/relay/%1").arg(thing->paramValue(channelParamTypeMap.value(thing->thingClassId())).toInt() + 1)); url.setUserName(parentDevice->paramValue(usernameParamTypeMap.value(parentDevice->thingClassId())).toString()); url.setPassword(parentDevice->paramValue(passwordParamTypeMap.value(parentDevice->thingClassId())).toString()); diff --git a/shelly/integrationpluginshelly.json b/shelly/integrationpluginshelly.json index 34d5cccd..3ee3f01d 100644 --- a/shelly/integrationpluginshelly.json +++ b/shelly/integrationpluginshelly.json @@ -1276,7 +1276,9 @@ "id": "0ed31339-7457-443c-b6e3-3b8ce3fc2bd8", "name": "count", "displayName": "Press count", - "type": "uint" + "type": "uint", + "minValue": 1, + "maxValue": 3 } ] },