#I'm trying to write an automation to
1 messages · Page 1 of 1 (latest)
In theory, my answer seems like it would work:
{% for char in command_text %}\x{{ '%02X' % (char | ord) }}{% endfor %}
In practice, I continued to have problems with this. Executing the script behaved as though > /dev/ttyUSB1 was part of the string getting passed as an argument to echo, so instead of piping the part before that to a device, it output that to stdout and didn't send anything to /dev/ttyUSB1