Headlines aller 3 Dashboard sind gleich

This commit is contained in:
hubobel 2026-05-31 17:36:58 +02:00
parent b7347f28ca
commit e707e0a71c

107
down.py
View file

@ -441,6 +441,23 @@ def draw_dashboard_1():
font=font_title
)
current_time = time.strftime("%H:%M")
bbox = draw.textbbox(
(0, 0),
current_time,
font=font_title
)
time_width = bbox[2] - bbox[0]
draw.text(
(WIDTH - time_width - 10, 5),
current_time,
fill="white",
font=font_title
)
draw.text(
(10, 30),
f"WLAN: {get_ip()}",
@ -557,41 +574,60 @@ def draw_dashboard_2():
draw = ImageDraw.Draw(img)
# Header wie Dashboard 1
draw.text(
(20, 20),
"SYSTEMSTATUS",
(10, 5),
"Hintergasse 9A",
fill="white",
font=font_title
)
draw.line(
(20, 60, WIDTH - 20, 60),
fill="white"
current_time = time.strftime("%H:%M")
bbox = draw.textbbox(
(0, 0),
current_time,
font=font_title
)
time_width = bbox[2] - bbox[0]
draw.text(
(WIDTH - time_width - 10, 5),
current_time,
fill="white",
font=font_title
)
draw.text(
(20, 100),
(10, 30),
f"WLAN: {get_ip()}",
fill="cyan",
font=font_small
)
draw.text(
(20, 130),
(240, 30),
f"WAN: {get_wan_ip()}",
fill="orange",
font=font_small
font=font_small_bold
)
draw.line(
(10, 80, WIDTH - 10, 80),
fill="white"
)
draw.text(
(20, 190),
(20, 110),
time.strftime("%d.%m.%Y"),
fill="white",
font=font_small_bold
)
draw.text(
(20, 220),
(20, 140),
time.strftime("%H:%M:%S"),
fill="green",
font=font_download
@ -609,34 +645,69 @@ def draw_dashboard_3():
draw = ImageDraw.Draw(img)
# Header wie Dashboard 1
draw.text(
(20, 20),
"DASHBOARD 3",
(10, 5),
"Hintergasse 9A",
fill="white",
font=font_title
)
draw.line(
(20, 60, WIDTH - 20, 60),
fill="white"
current_time = time.strftime("%H:%M")
bbox = draw.textbbox(
(0, 0),
current_time,
font=font_title
)
time_width = bbox[2] - bbox[0]
draw.text(
(WIDTH - time_width - 10, 5),
current_time,
fill="white",
font=font_title
)
draw.text(
(20, 100),
(10, 30),
f"WLAN: {get_ip()}",
fill="cyan",
font=font_small
)
draw.text(
(240, 30),
f"WAN: {get_wan_ip()}",
fill="orange",
font=font_small_bold
)
draw.line(
(10, 80, WIDTH - 10, 80),
fill="white"
)
# Inhalt Dashboard 3
draw.text(
(20, 110),
"Bereit fuer weitere",
fill="green",
font=font_small
)
draw.text(
(20, 130),
(20, 140),
"Informationen",
fill="green",
font=font_small
)
draw.text(
(20, 200),
(20, 210),
"GPIO21 aktiv",
fill="orange",
font=font_small_bold