Shelly: Fix switch settings for second channel

This commit is contained in:
Michael Zanetti 2021-10-22 21:03:06 +02:00
parent e7eae3711f
commit 0c290fd475
2 changed files with 4 additions and 2 deletions

View File

@ -1519,7 +1519,7 @@ void IntegrationPluginShelly::setupShellyChild(ThingSetupInfo *info)
url.setScheme("http"); url.setScheme("http");
url.setHost(address); url.setHost(address);
url.setPort(80); 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.setUserName(parentDevice->paramValue(usernameParamTypeMap.value(parentDevice->thingClassId())).toString());
url.setPassword(parentDevice->paramValue(passwordParamTypeMap.value(parentDevice->thingClassId())).toString()); url.setPassword(parentDevice->paramValue(passwordParamTypeMap.value(parentDevice->thingClassId())).toString());

View File

@ -1276,7 +1276,9 @@
"id": "0ed31339-7457-443c-b6e3-3b8ce3fc2bd8", "id": "0ed31339-7457-443c-b6e3-3b8ce3fc2bd8",
"name": "count", "name": "count",
"displayName": "Press count", "displayName": "Press count",
"type": "uint" "type": "uint",
"minValue": 1,
"maxValue": 3
} }
] ]
}, },