Bring ModeSet value out of the for loop, this ModeSet is repeated for every other value on the webpage.

This commit is contained in:
Yves De Muyter 2021-02-10 11:15:23 +01:00
parent d4de1cd69b
commit 74d99c669a
1 changed files with 6 additions and 3 deletions

View File

@ -1336,13 +1336,16 @@ void TuyaSensorsShow(bool json)
break;
}
}
if (AsModuleTuyaMS()) {
WSContentSend_P(PSTR("{s}" D_JSON_IRHVAC_MODE "{m}%d{e}"), Tuya.ModeSet);
}
#endif // USE_WEBSERVER
}
}
#ifdef USE_WEBSERVER
if (AsModuleTuyaMS()) {
WSContentSend_P(PSTR("{s}" D_JSON_IRHVAC_MODE "{m}%d{e}"), Tuya.ModeSet);
}
#endif // USE_WEBSERVER
if (RootName) { ResponseJsonEnd();}
}