Skip to content

Commit

Permalink
Merge pull request pi-hole#991 from pi-hole/new/user-definable-temp-l…
Browse files Browse the repository at this point in the history
…imit

Add TEMPERATURELIMIT setting
  • Loading branch information
AzureMarker authored Aug 21, 2019
2 parents ba0cdde + 693a2f4 commit a7d07f9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/pi-hole/php/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@
{
$temperatureunit = $_POST["tempunit"];
}
// Get user-defined temperature limit if set
if(isset($setupVars['TEMPERATURE_LIMIT']))
{
$temperaturelimit = intval($setupVars['TEMPERATURE_LIMIT']);
}
else
{
$temperaturelimit = 60;
}
}
else
{
Expand Down Expand Up @@ -339,7 +348,7 @@ function pidofFTL()
{
if ($celsius >= -273.15) {
echo "<a id=\"temperature\"><i class=\"fa fa-fire\" style=\"color:";
if ($celsius > 60) {
if ($celsius > $temperaturelimit) {
echo "#FF0000";
}
else
Expand Down

0 comments on commit a7d07f9

Please sign in to comment.