diff --git a/app.go b/app.go
index 9dfabf9..e217577 100644
--- a/app.go
+++ b/app.go
@@ -3,6 +3,7 @@ package main
import (
"context"
"io"
+ "log"
"net/http"
"regexp"
"strconv"
@@ -61,15 +62,18 @@ func (a *App) GetLamps() (lamps []string) {
}
func (a *App) SetLampBrightness(lampId int, brightness int) string {
+ log.Printf("Setting lamp %d to %d", lampId, brightness)
resp, err := http.Get("http://" + IP + "/lamp/" + strconv.Itoa(lampId) + "?n=" + strconv.Itoa(brightness))
if err != nil {
runtime.LogError(a.ctx, err.Error())
+ log.Printf("Error: %s", err.Error())
return ""
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
runtime.LogError(a.ctx, err.Error())
+ log.Printf("Error: %s", err.Error())
return ""
}
return string(body)
diff --git a/frontend/src/lib/components/Lamp.svelte b/frontend/src/lib/components/Lamp.svelte
index a16d043..f9e8626 100644
--- a/frontend/src/lib/components/Lamp.svelte
+++ b/frontend/src/lib/components/Lamp.svelte
@@ -1,13 +1,14 @@
diff --git a/frontend/src/lib/router/routes/Home.svelte b/frontend/src/lib/router/routes/Home.svelte
index 52600be..7deabc4 100644
--- a/frontend/src/lib/router/routes/Home.svelte
+++ b/frontend/src/lib/router/routes/Home.svelte
@@ -1,6 +1,6 @@
-
-
+
+
\ No newline at end of file