TEMPERATUREUNIT not working in Docker?

Expected Behaviour:

Using TEMPERATUREUNIT=f in Docker Compose file, expecting temperate in admin page to show in Fahrenheit.

Actual Behaviour:

Temperature still listed in Celsius.

Is there a known issue with the TEMPERATUREUNIT flag in a Docker instance of Pi-Hole? Running on my Synology NAS, the admin page still shows the temperature in Celsius. If I run the Chronometer script, though, it does show the temp in F. Not a big deal but wanted to ask.

Can you post your compose file?

version: "3.8"

services:
  pihole:
    container_name: pihole
    hostname: pihole-docker
    image: pihole/pihole:latest
    environment:
      - TZ=America/New_York
      - WEBPASSWORD=<password>
      - PIHOLE_DNS_=1.1.1.1;9.9.9.9
      - DNSMASQ_LISTENING=local
      - DNSMASQ_USER=root
      - TEMPERATUREUNIT=f
    volumes:
      - /volume1/docker/pihole/etc/pihole:/etc/pihole
      - /volume1/docker/pihole/etc/dnsmasq.d:/etc/dnsmasq.d
    networks:
      macvlan:
        ipv4_address: 192.168.1.81
    restart: unless-stopped

networks:
  macvlan:
    external: true

image

Can you shell in to the running container and get the output of the env command to show what the current environment is?

Has the temperature display been correct before and now it's not?

Setting this environment variable sets the value in setupVars.conf, but this is only used in chronometer (as you have seen) and PADD (also - use PADD, it's much sexier than chronometer)

For the web interface, the setting was moved to a per-browser setting alongside some others in this PR:

Some further discussion around the subject can be found:

Argh, yes! I see that now:

image

I changed that and it worked. Sheesh, sorry. More user error. :slight_smile:

The documentation wasn't very clear on the Docker readme... so I've changed that now, too!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

With Pi-hole FTL v5.21, Web v5.18.4 and Core v5.15.5 released

the temperature unit set in setupVars.conf does also set the unit for the web interface now.

1 Like