From 44c7f7a675d2cdb0281322f38be3227ef4fb1df2 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 7 Dec 2025 16:02:20 -0700 Subject: Add a "reset defaults" button and handler. --- controller_webpage/index.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'controller_webpage') diff --git a/controller_webpage/index.html b/controller_webpage/index.html index bfa6461..1a308eb 100644 --- a/controller_webpage/index.html +++ b/controller_webpage/index.html @@ -166,6 +166,7 @@

Tree Lights Controller

+
@@ -341,6 +342,18 @@ } } + async function resetDefaults() { + setStatus("Resetting…"); + try { + await fetch(`${BASE_URL}/reset`, { method: "POST" }); + await refreshValues(); + setStatus("Reset to defaults"); + } catch (err) { + setStatus("Reset failed"); + console.error(err); + } + } + refreshValues(); -- cgit