Custom intent recognition with external command

Hi,

I’m trying to use an external command for the intent recognition, since this let’s me use wildcards in the command. Right now, the rhasspy profile has:

"intent": {
        "command": {
            "program": "${RHASSPY_PROFILE_DIR}/intents.py"
        },
        "system": "command"
    },

and my intents.py script is located at: /home/pi/.config/rhasspy/profiles/en/intents.py.

But, docker logs rhasspy shows:

FileNotFoundError: [Errno 2] No such file or directory: '${RHASSPY_PROFILE_DIR}/intents.py': '${RHASSPY_PROFILE_DIR}/intents.py'
[DEBUG:2021-08-18 12:55:47,962] rhasspyremote_http_hermes: -> NluError(error='FileNotFoundError(2, "No such file or directory: \'${RHASSPY_PROFILE_DIR}/intents.py\'")', site_id='default', context="NluQuery(input='what time is it', site_id='default', id=None, intent_filter=None, session_id='default-porcupine_raspberry-pi-c74dddb5-30bb-469a-9693-cea258a92ddc', wakeword_id='porcupine_raspberry-pi', lang=None, custom_data='porcupine_raspberry-pi', asr_confidence=1.0, custom_entities=None)", session_id='default-porcupine_raspberry-pi-c74dddb5-30bb-469a-9693-cea258a92ddc')
[DEBUG:2021-08-18 12:55:47,963] rhasspyremote_http_hermes: Publishing 513 bytes(s) to hermes/error/nlu

Which shows that the file is not found, but I am not sure why. I am running rhasspy with the docker command listed here and have also followed this post, which led me to run
chmod +x /home/pi/.config/rhasspy/profiles/en/intents.py and include the shebang at the top of the script.

So, I am at a loss as to why this is not being recognized. Does anyone have any ideas?

EDIT: I tried with an absolute path but that did not work either:

FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.config/rhasspy/profiles/en/intents.py': '/home/pi/.config/rhasspy/profiles/en/intents.py'