diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php
index 175fd41f..b3d783c9 100644
--- a/scripts/pi-hole/php/header.php
+++ b/scripts/pi-hole/php/header.php
@@ -66,6 +66,8 @@
// Nothing can be colder than -273.15 degree Celsius (= 0 Kelvin)
// This is the minimum temperature possible (AKA absolute zero)
$celsius = -273.16;
+ // Set templimit to null if no tempsensor was found
+ $temperaturelimit = null;
}
// Get load
@@ -375,18 +377,16 @@ if($auth) {
?>
$temperaturelimit) {
- $tempcolor = "text-red";
- }
- echo ' ';
-
- if ($celsius >= -273.15) {
+ if ($celsius >= -273.15) {
+ // Only show temp info if any data is available -->
+ $tempcolor = "text-vivid-blue";
+ if (isset($temperaturelimit) && $celsius > $temperaturelimit) {
+ $tempcolor = "text-red";
+ }
+ echo ' ';
echo 'Temp: ' .$celsius. '';
- } else {
- echo "No temp sensor found";
- }
- echo '';
+ echo '';
+ }
?>