I haven’t used it (and don’t plan to ), but I think what you seeking for is self.call_service(“hangouts/send_message”,target=[{ ‘id’: ‘XXX’}, { ‘name’: ‘conversation’}], message=[{“text”: "test}])
The doc says it needs a list, which you are technically not passing based on the examples you gave you have tried.
one thing I found, if you include the { “id” : “fadjf” } as well as the name, it will treat it as two conversations and send the message to the conversation twice, so you only need the id or the name for it to work correctly.
I’m also trying to send using Hangouts. The goal is to send a message from an automation.
I’ve tested using the service developer tool but can’t get the JSON format correct.
I could only get this to work using the target ID and not the target name. Under states where I find the ID for my conversations…it list the “name” for both as null. Is there a way for me to set the name to something?
I haven’t set this up yet as I keep getting session closed errors, which I believe are being looked at. Once that is fixed, I will be looking at this, once I get it working I will let you know what I have done.
Have you set the name in the hangouts app (the web version) I set up the group in the web version putting in everyone I wanted and giving it a name there, then when it showed up in home assistant conversations, it already had a name.
The way I have done it is using the hangouts account for the HA, I have created a conversation with just one person, and named that conversation with the person’s name, then set it up in the notify area of HA.
I have switched to notify/xxxx service calls as they correctly format the messages, if you just do send_message/xxx service calls it ignores formatting (new lines etc.)
I have some similar issues. I use Hangouts notification from HA automations. Usually it works very well but after some time (several days, probably a week) I start to get messages in the log about “session closed”. It happened for the second time today (I mean for the second time since I started to use it). Last time only Pi reboot helped. I am still investigating the current case.
Probably this information would help you, or probably you could share your findings if you managed to fix it