Not directly to your question. That said, I have found good results by using the command_line sensor with bash scripts. Makes it a bit easier to debug, without having to start and stop HA as you revise. Example below sends parameter to bash script and returns results in a JSON string to HA. I have crammed several script commands on to a single line of a command_line command: argument, however, it gets messy quickly. Good hunting!
I found this thread having the same issue. Solved it like this as I supect HA only forwards whatever you write as command to the underlying linux OS and there you can run several commands in sequence by separating them with &&. So Commad1 && Command2 && Command3. From my testing it appears 2 will not be run before 1 is done. But not sure. Anyway. I can run several curl commands like this, with no issue
*I know this is an old thread, but maybe someone else can find it in search of answers