Disable the temperature of the status bar

Some devices are not supported, such as virtual machines/containers.
Can it be turned off?
image

For v5, which uses PHP, an unofficial way to remove temperature is to edit the file

/var/www/html/admin/scripts/pi-hole/php/sidebar.php

and locate the line

if ($celsius >= -273.15) {

and change it to

if (false) {

I don't have a v6 set up to test but it looks like the equivalent file would be in (I'm not sure of the starting path)

.../scripts/pi-hole/lua/sidebar.lp

There is a line which can be commented out or deleted (again I've not tested this)

<span id="temperature"></span><br/>

These are probably not great ways to achieve this. I suspect after an update the files will be restored. And there's probably a proper way to test for a VM and make it not appear. I understood that temperature and load were not going to present in v6, so maybe these are due to be removed.

Another option, if you are using a single browser to access Pi-hole, and that browser supports something like Adblock Plus or uBlock Origin, is to use the element hiding helper in these to target and hide the temperature line.

The best way is to turn it off via parameters.

Actually, this icon shows additional sensor information:

image

Removing it will remove all sensor information.

The best way is to turn it off via parametersCan be made optional and displayed by default; users who don't need it can turn it off.