diff --git a/src/driver/drv_tuyaMCU.c b/src/driver/drv_tuyaMCU.c index d47640037..bb2b0428d 100644 --- a/src/driver/drv_tuyaMCU.c +++ b/src/driver/drv_tuyaMCU.c @@ -898,7 +898,7 @@ void TuyaMCU_ParseStateMessage(const byte *data, int len) { //CHANNEL_SetAllChannelsByType(QQQQQQ, iVal); // 06 46 = 1606 => A x 100? ? iVal = data[ofs + 11 + 4] << 8 | data[ofs + 12 + 4]; - //CHANNEL_SetAllChannelsByType(QQQQQQ, iVal); + CHANNEL_SetAllChannelsByType(ChType_Current_div1000, iVal); // Voltage? iVal = data[ofs + 13 + 4] << 8 | data[ofs + 14 + 4]; CHANNEL_SetAllChannelsByType(ChType_Voltage_div10, iVal); diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 5991cb6fc..69995546f 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -518,6 +518,14 @@ int http_fn_index(http_request_t* request) { hprintf255(request, "Current %fA (ch %i)", fValue, i); poststr(request, ""); } + else if (channelType == ChType_Current_div1000) { + iValue = CHANNEL_Get(i); + fValue = iValue * 0.001f; + + poststr(request, "