[SOLVED] Mount BitLocker encrypted USB disk to HA OS using udev rules

If anyone needs to mount external USB disk encrypted by BitLocker to Home assistant, I have created udev rule that automatically mounts the USB drive to /media/disk-[device name], and reads BitLocker encryption recovery key from a file:

Note that you cannot install this directly inside HA OS container (using standard SSH Terminal add-on which runs in “protected mode”), but you need the full root access to HA OS supervisor (as explained here Debugging the Home Assistant Operating System | Home Assistant Developer Docs, which gives you root access by ssh to port 22222).

Instructions how to install this udev rule are included in the attached udev rule file.