Use other directory than /tmp for temporary files when updating

I updated hass via python3.8 -m pip install --upgrade homeassistant and it could not start as the first run does lots of downloading and setup and it quickly runs out of space /tmp which tmpfs on a modest orangepi. So I disable a bunch of tmpfs services, /etc/fstab, reboot, let hass finish setup, reenable tmpfs services, reboot.

May be there is a way to tell hass to use a directory within the homedir? Otherwise tmpfs works fine. Thanks.

It’s not HA that uses that folder, it’s Python.

I’d expect that setting the environment variable TMPDIR to a suitable folder will help here.