mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-15 11:52:12 +01:00
Fix issue where the available shades to be grouped was not correct #183
This commit is contained in:
parent
46f6e6912d
commit
9444d6119b
2 changed files with 2 additions and 2 deletions
Binary file not shown.
4
Web.cpp
4
Web.cpp
|
|
@ -1205,7 +1205,7 @@ void Web::begin() {
|
||||||
int groupId = atoi(server.arg("groupId").c_str());
|
int groupId = atoi(server.arg("groupId").c_str());
|
||||||
SomfyGroup* group = somfy.getGroupById(groupId);
|
SomfyGroup* group = somfy.getGroupById(groupId);
|
||||||
if (group) {
|
if (group) {
|
||||||
DynamicJsonDocument doc(4096);
|
DynamicJsonDocument doc(8192);
|
||||||
JsonObject obj = doc.to<JsonObject>();
|
JsonObject obj = doc.to<JsonObject>();
|
||||||
group->toJSON(obj);
|
group->toJSON(obj);
|
||||||
JsonArray arr = obj.createNestedArray("availShades");
|
JsonArray arr = obj.createNestedArray("availShades");
|
||||||
|
|
@ -1214,7 +1214,7 @@ void Web::begin() {
|
||||||
if(shade->getShadeId() != 255) {
|
if(shade->getShadeId() != 255) {
|
||||||
bool isLinked = false;
|
bool isLinked = false;
|
||||||
for(uint8_t j = 0; j < SOMFY_MAX_GROUPED_SHADES; j++) {
|
for(uint8_t j = 0; j < SOMFY_MAX_GROUPED_SHADES; j++) {
|
||||||
if(group->linkedShades[i] == shade->getShadeId()) {
|
if(group->linkedShades[j] == shade->getShadeId()) {
|
||||||
isLinked = true;
|
isLinked = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue