home-assistant-ecosystem / home-assistant-cli

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

How to pass complex arguments to hass-cli #320

Closed johntdyer closed 4 years ago

johntdyer commented 4 years ago

I am trying to call a service and pass a bit of data into it... however this isnt working for me...

hass-cli -x -s http://127.0.0.1:8123 service call notify.webex_teams --arguments 'message="Ding-dong",data.files=["https://makeawebsitehub.com/wp-content/uploads/2019/03/google-url-shortener-alternatives.png"]'

Am I missing something or does it need to be structured differently ?

maxandersen commented 4 years ago

see #319 :)

johntdyer commented 4 years ago

So does this mean its not possible until that gets merged?

maxandersen commented 4 years ago

for "service call" yes; but you should be able to use "raw get" or "raw put" using --json parameter to do the same thing if you want something that works today.

pssc commented 4 years ago

Hi i have just tripped over the inability for services to have complex args using hass-cli to call the hassio.addon_stdin service without this it's impossible to call most of these services via the cli.

The pull request #319 now seems stalled for a month or so @maxandersen what needs to be done?

maxandersen commented 4 years ago

sorry - been travelling and not home with my homeassistant system to test.

unfortunately that is going to be more and more common so if someone wants to step up and become a committer let me know and I'll add you!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.