From df2154d048898d25076aac1c10da2df8c8a644a4 Mon Sep 17 00:00:00 2001 From: Gregg Date: Sun, 7 Aug 2022 19:54:34 -0500 Subject: [PATCH] Update ProgrammableHub2.ino --- Other Examples/ProgrammableHub2/ProgrammableHub2.ino | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Other Examples/ProgrammableHub2/ProgrammableHub2.ino b/Other Examples/ProgrammableHub2/ProgrammableHub2.ino index 08ab1eb..1bb4154 100644 --- a/Other Examples/ProgrammableHub2/ProgrammableHub2.ino +++ b/Other Examples/ProgrammableHub2/ProgrammableHub2.ino @@ -306,6 +306,7 @@ void setupWeb(){ if(!openSlots) response += "

Can't add any more Light Accessories. Max="+ String(MAX_LIGHTS) + "

"; + response += "

Press here to delete ALL Light Accessories:

"; response += "

Press here to update the Home App when finished making changes:

"; response += ""; @@ -326,6 +327,16 @@ void setupWeb(){ }); + webServer.on("/deleteAll", []() { + + String response = "HomeSpan Programmable Light Hub"; + response += "Deleting All Light Accessories..."; + + webServer.send(200, "text/html", response); + deleteAllAccessories(""); + + }); + webServer.on("/update", []() { String response = "HomeSpan Programmable Light Hub";