From 9bc0cd5629608a4e6f6c3ce7972339e2b4315363 Mon Sep 17 00:00:00 2001
From: Chuck <33324927+ChuckBuilds@users.noreply.github.com>
Date: Mon, 15 Sep 2025 11:48:10 -0400
Subject: [PATCH] moving away from dict errors
---
templates/index_v2.html | 6 +++---
update_pi_files.py | 32 ++++++++++++++++++++++++++++++++
web_interface_v2.py | 7 +++++--
3 files changed, 40 insertions(+), 5 deletions(-)
create mode 100644 update_pi_files.py
diff --git a/templates/index_v2.html b/templates/index_v2.html
index e92db3ce..c81ecfb3 100644
--- a/templates/index_v2.html
+++ b/templates/index_v2.html
@@ -877,11 +877,11 @@
CPU Temperature
-
{{ main_config.display.hardware.brightness if main_config and main_config.display and main_config.display.hardware and main_config.display.hardware.brightness is defined else 0 }}
+
{{ main_config.get('display', {}).get('hardware', {}).get('brightness', 0) }}
Brightness
-
{{ main_config.display.hardware.cols if main_config and main_config.display and main_config.display.hardware and main_config.display.hardware.cols is defined else 0 }}x{{ main_config.display.hardware.rows if main_config and main_config.display and main_config.display.hardware and main_config.display.hardware.rows is defined else 0 }}
+
{{ main_config.get('display', {}).get('hardware', {}).get('cols', 0) }}x{{ main_config.get('display', {}).get('hardware', {}).get('rows', 0) }}
Resolution
@@ -1128,7 +1128,7 @@
How long each screen is shown before switching. Values in seconds.