I have many command_line sensors in this form that all work well using virtually the same command - only the line name is different. In this case “central”.
Have you tried a macro that outputs something much more simple, like say just an “echo” command? To figure out whether Jinja imports even work at all for this integration/type of sensor…
Unknown typically means the sensor and it’s template is correct but it just hasn’t ran the query yet. Have you waited?
As a sidebar, you can likely turn this into a responding service with a command_line command and use template sensors instead. Then you can trigger whenever you want to only hit the APIs when you need them. Food for thought.
That method also allows you to test the service whenever you want and look at the response.
However in any case I wonder if I have understood your suggestion correctly as I am not sure how I can ever pass a line name into the shell command, which would look like this (if I could):