Shell_command not working as expected

if i use

shell_command:
    test: echo 'test' > /config/test

it works… if i use the syntax

shell_command:
    test: echo '{{ variable }}' > /config/test

it doesn’t work… strange thing, with mkdir command “{{ variable }}” works as expected

any idea?! bug?!

thanks

https://www.home-assistant.io/integrations/shell_command/#configuration

“>” too?! mmmm, i have to find another solution… thanks

workaround: just put the code in a script instead of a shell_command, then use the shell_command to call that script and pass the {{variable}} to it

seems working, not a big work, and we can modify the script without needing to reboot

Exactly what I do :slight_smile: