Connecting via ssh to DietPi from a foot terminal

Just a quick post, if anybody else runs into this problem.
I recently installed Fedora with Sway on another machine, which comes with foot terminal.
When I connected via SSH from foot to DietPi I got a warning about a unrecognized $term variable / terminal.

The message suggested to install ncurses-term, which I did, but it did not help. On every connection the warning popped up again.
The fix was really easy, I just had to install foot-terminfo:

apt install foot-terminfo

did you create a foot.ini file?

Fedora sway already comes with one in /etc/xdg/foot/foot ini.
I just copied it to the users home folder ~/.config/foot/foot.ini
But the problem was on the dietpi machine, I installed the package on dietpi, bc there was no config for foot in /usr/share/terminfo/f/.