home-assistant-ecosystem / home-assistant-cli

:computer: Command-line tool for Home Assistant
Other
446 stars 69 forks source link

Issue escaping spaces #351

Open AlecRust opened 3 years ago

AlecRust commented 3 years ago

On my MacBook, if I run the following command it completes successfully:

hass-cli service call notify.alec --arguments title="My Title",message="My description."

If I SSH in to my NUC where hass-cli is also installed and run the same command it fails with:

Error: Got unexpected extra arguments (Title,message=My description.)

It seems to be an issue with escaping the spaces. This works for example:

hass-cli service call notify.alec --arguments title="My-Title",message="My-description."

Could this be an issue with hass-cli? Or the way hass-cli is set up on my NUC? I don't seem to have this problem passing strings to other CLI tools.

kreucher commented 1 year ago

ran into this too... seems to be a problem with hass-cli and how it uses the click python library

pull https://github.com/home-assistant-ecosystem/home-assistant-cli/pull/319 may fix it by allowing yaml or json as args, but the merge seems to have been stalled