Shell_command and templates error

I wrote a python script that read SMS received by my huawei router (with “huawei-modem-api-client”) and store in a SQLite database for later processing. This script works well when:

  • I put huawei modem url, user, password in the script itself
  • or directly in the command line under shell_command: section of configuration.yaml

but not when I use templates variables in the shell_command section and i define these variables in the automation.yaml as parameters of the service call with !secret redirection.

In this case I get errors from huawei-modem-api-client: can’t connect to url, max retry exceeded and so on.

I think this can be related to the “more secure environment” used for running my command when using templates.

Any idea to inspect and solve this issue?

My mistake: moderator please delete