web-ha 同步显示插座状态

This commit is contained in:
zogodo
2020-02-16 21:55:38 +08:00
parent 26814c015a
commit f9d9a5b91a
4 changed files with 5 additions and 4 deletions

View File

@@ -215,7 +215,7 @@ bool JsonSocketAnalysis(int udp_flag, unsigned char x, cJSON * pJsonRoot, cJSON
if (!pJsonSend) return false;
bool return_flag = false;
char socket_str[] = "socket_X";
socket_str[5] = x + '0';
socket_str[7] = x + '0';
cJSON *p_socket = cJSON_GetObjectItem(pJsonRoot, socket_str);
if (!p_socket) return_flag = false;