-
Notifications
You must be signed in to change notification settings - Fork 556
Description
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": "XXXXXXX987933105@g.us",
"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. 😃