From 74d4fea695e44103cf2ea8aed3b4bbc7c20a844a Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Mon, 17 Nov 2025 21:42:47 +0100 Subject: [PATCH] new ui 5 --- apps/ui/main.py | 18 + apps/ui/templates/device.html | 879 ++++++++++++++++++++++++++++++++++ 2 files changed, 897 insertions(+) create mode 100644 apps/ui/templates/device.html diff --git a/apps/ui/main.py b/apps/ui/main.py index f356db2..07a6ce8 100644 --- a/apps/ui/main.py +++ b/apps/ui/main.py @@ -111,6 +111,24 @@ async def room_detail(request: Request, room_name: str) -> HTMLResponse: }) +@app.get("/device/{device_id}", response_class=HTMLResponse) +async def device_detail(request: Request, device_id: str) -> HTMLResponse: + """Render the device detail page with controls. + + Args: + request: The FastAPI request object + device_id: ID of the device to display + + Returns: + HTMLResponse: Rendered device template + """ + return templates.TemplateResponse("device.html", { + "request": request, + "api_base": API_BASE, + "device_id": device_id + }) + + @app.get("/dashboard", response_class=HTMLResponse) async def dashboard(request: Request) -> HTMLResponse: """Render the dashboard with rooms and devices. diff --git a/apps/ui/templates/device.html b/apps/ui/templates/device.html new file mode 100644 index 0000000..2ad82c6 --- /dev/null +++ b/apps/ui/templates/device.html @@ -0,0 +1,879 @@ + + + + + + Gerät - Home Automation + + + +
+
+ ← Zurück +
📱
+

Gerät wird geladen...

+
+
+
+ +
+
Lade Gerät...
+ +
+ + + +