TCP Port via Variable --> The text $_HOSTSSSLPORT$ is not a valid integer number

The WATO input field is an Interger() and only supports integer input. I am afraid you cannot do much here with this WATO input validation in place.