diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 77c9a69ff..f76fd6f13 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -73,6 +73,7 @@ template_t g_templates [] = { { Setup_Device_13A_Socket_CB2S, "BK7231N CB2S 13A Aliexpress socket"}, { Setup_Device_Deta_Smart_Double_Power_Point_6922HA_Series2, "BK7231T DETA SMART Double Power Point 6922HA-Series 2"}, { Setup_Device_ArlecRGBCCTDownlight, "Arlec RGB+CCT LED Downlight ALD092RHA"}, + { Setup_Device_KS_602_TOUCH, "KS-602 Touch Switch US"}, }; int g_total_templates = sizeof(g_templates)/sizeof(g_templates[0]); diff --git a/src/new_builtin_devices.c b/src/new_builtin_devices.c index f589bbd30..dea0e41cd 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -712,6 +712,18 @@ void Setup_Device_13A_Socket_CB2S(){ CFG_Save_SetupTimer(); } +void Setup_Device_KS_602_TOUCH() { + CFG_ClearPins(); + + PIN_SetPinRoleForPinIndex(17, IOR_Relay); + PIN_SetPinChannelForPinIndex(17, 1); + + PIN_SetPinRoleForPinIndex(26, IOR_Button); + PIN_SetPinChannelForPinIndex(26, 1); + + CFG_Save_SetupTimer(); +} + //Australian 2 Gang Wall Switch //https://obrazki.elektroda.pl/2789424600_1656890909.jpg void Setup_Device_Deta_Smart_Double_Power_Point_6922HA_Series2() {