I did like @morberg said in his post. So basically you need to install tinydtls and aiocoap. In order to do so you first need to install cython. So stop HA, activative your virtual environment (if you’ve installed HA in one) and execute the following command:
pip3 install cython
This may take a while - even though it looks nothing happens, just wait for it to finish.
Afterwards enter the following commands (taken from here: https://github.com/ggravlingen/pytradfri/blob/4d4a682f2f646d41d2a6e4a65858e376f56e24ed/script/install-aiocoap.sh)
git clone --depth 1 https://git.fslab.de/jkonra2m/tinydtls.git
cd tinydtls
autoreconf
./configure --with-ecc --without-debug
cd cython
python3 setup.py install
cd ../..
git clone https://github.com/chrysn/aiocoap
cd aiocoap
git reset --hard 3286f48f0b949901c8b5c04c0719dc54ab63d431
python3 -m pip install --upgrade pip setuptools
python3 -m pip install .
Afterwards I restarted HA and TRADFRI was back. I hope these steps will help you!