Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant Examples of WhatsApp-API usage requested to get inspired and understanding #241

Open
WJ4IoT opened this issue Jul 4, 2024 · 0 comments

Comments

@WJ4IoT
Copy link

WJ4IoT commented Jul 4, 2024

Hi, hope people can share their examples, I am a Cut&Paste guy aka NOOB/Newbie. At this point I can send a msg to a whatsapp and hope to learn from more talented people who want to share their examples of usage of this whatsapp-api to and from Home Assistant.

I shall start with my simple POST example:

rest_command:
  send_whatsapp_web_api_door:
    url: "http://localhost:3000/client/sendMessage/HASS"
    method: post
    headers:
      content-type: application/json
    payload: >
      {
      "chatId": "[email protected]",
      "contentType": "string", 
      "content": "*Warning*
      \nDoor open/close"
      }

(BTW for other NOOBS you need to find the chatid=contact you want to use in see: curl http://localhost:3000/client/getContacts/HASS or ABCD. After saving go to YAML configuration reloading just "RESTFUL COMMAND" will do and you find this new command under services)

Any example is welcome, most interested how to setup the actions for on receiving a message.
I will continue with T&E and yes I should RTFM but I know you are out there and found already the correct syntax and can share nice examples. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant