giuseppecastaldo / ha-addons

Home Assistant Whatsapp Add-on
Apache License 2.0
49 stars 18 forks source link

Buttons not working #69

Open jelmerwouters opened 3 months ago

jelmerwouters commented 3 months ago

For some reason this issue was closed, but the issue is not resolved.

Using the example code from the documentation does not result in a message send with buttons. Nothing is received.

service: whatsapp.send_message
data:
  clientId: default
  to: 391234567890@s.whatsapp.net
  body:
    text: Hi it's button message
    footer: Hello World
    buttons:
      - buttonId: id1
        buttonText:
          displayText: Button 1
        type: 1
      - buttonId: id2
        buttonText:
          displayText: Button 2
        type: 1
      - buttonId: id3
        buttonText:
          displayText: Button 3
        type: 1
    headerType: 1
moryoav commented 3 months ago

I can confirm. Lists are also not working by the way, perhaps related to the same issue.

gnrodo commented 3 months ago

Try the "Android device only" example which is currently working:

service: whatsapp.send_message
data:
  clientId: default
  to: 391234567890@s.whatsapp.net
  body:
    text: Hi it's a template message
    footer: Hello World
    templateButtons:
      - index: 1
        urlButton:
          displayText: ⭐ Star Whatsapp addon on GitHub!
          url: "https://github.com/giuseppecastaldo/ha-addons/tree/main/whatsapp_addon"
      - index: 2
        callButton:
          displayText: Call me!
          phoneNumber: +1 (234) 5678-901
      - index: 3
        quickReplyButton:
          displayText: "This is a reply, just like normal buttons!"
          id: id-like-buttons-message
mupsje commented 2 months ago

Nope, still not working

tbutiu commented 2 months ago

the clientId is to be a whatsapp business ? i am trying with a plain client, but no luck on this

moryoav commented 1 month ago

body: text: Hi it's a template message footer: Hello World templateButtons:

The strange thing is that the lists for "Android devices only", when I send with this service data as mentioned here, I can see in whatsapp web the message "This message can't be shown on Whatsapp web. Open Whatsapp on your phone to view". But in the whatsapp in the phone there's nothing.

Eeon123 commented 1 month ago

event_type: new_whatsapp_message data: clientId: XXXXXXXX type: viewOnceMessage key: remoteJid: XXXXXXXXX@s.whatsapp.net fromMe: false id: XXXXXXXXXXXXXXXXX messageTimestamp: XXXXXXXX pushName: XXXXXXXXXXXX broadcast: false message: viewOnceMessage: message: templateMessage: fourRowTemplate: {} hydratedTemplate: hydratedContentText: Hi its a template message hydratedFooterText: Hello World hydratedButtons: - urlButton: displayText: ⭐ Star Whatsapp addon on GitHub! url: >- https://github.com/giuseppecastaldo/ha-addons/tree/main/whatsapp_addon index: 1 - callButton: displayText: Call me! phoneNumber: +1 (234) 5678-901 index: 2 - quickReplyButton: displayText: This is a reply, just like normal buttons! id: id-like-buttons-message index: 3 messageContextInfo: deviceListMetadata: {} deviceListMetadataVersion: 2 origin: REMOTE time_fired: "XXXXXXXXXXXXXXXXX" context: id: XXXXXXXXXXXXXXXXX parent_id: null user_id: XXXXXXXXXXXXXXXXX

This is what I receive when I start listening for new_whatsapp_message event and run automation using this as reference: https://github.com/giuseppecastaldo/ha-addons/blob/main/whatsapp_addon/DOCS.md#how-to-send-list-android-devices-only

But dont receive any message in phone.

Can anyone help to solve this?