diff --git a/README.md b/README.md index e893cdfb5..f80e27cd4 100644 --- a/README.md +++ b/README.md @@ -453,6 +453,7 @@ Some channels have "_div10" or "_div100" sufixes. This is for TuyaMCU. This is n | Voltage_div10 | Divide by 10 and display value as a V voltage. | TODO | | Current_div100 | Divide by 100 and display value as a A current. | TODO | | Current_div1000 | Divide by 1000 and display value as a A current. | TODO | +| OffDimBright | 3 options - Off (0), Dim (1), Bright (2). Used for TuyaMCU LED indicator. | TODO | # Simple TCP command server for scripting diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 99fae4636..468746901 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -653,6 +653,25 @@ int http_fn_index(http_request_t* request) { hprintf255(request, "", CHANNEL_GetLabel(i)); poststr(request, ""); } + else if (channelType == ChType_OffDimBright) { + const char* types[] = { "Off","Dim","Bright" }; + iValue = CHANNEL_Get(i); + + poststr(request, "
Select level:
"); + poststr(request, "