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.

Can I close this problem by changing the environment variables or parameters?
Because I run the container, I can't show this.
image

  1. automatically hide when the value is N/A

  2. For example: docker-compose.yaml

environment:
  - FTLCONF_status_temp: false

No.
Currently there is no way to hide the sensor information.

Would you consider displaying the temperature as an option?
Because I don't have a temperature sensor.

As I said, currently there is no way to disable it. You need to live with it.

You can open a Feature Request.

The request will be considered for development if:

  • it receives enough votes AND
  • Pi-hole team decides it is a valid request (I don't see why not) AND
  • it is technically doable.