Ok… I’m writing this post because I’ve been trying to solve this for 12 straight hours and I couldn’t find anyone to explain how to do it. I hope it will be useful to all the people who, like me, almost gave up.
In this post I will try to explain in the clearest and most complete way that my level of English allows me how to connect Google Assistant to Home Assistant if you are using the Cloudflare tunnel for your remote connection.
In my case I use the cloudflared add-on and a paid domain but I understand that with a free one and managing the tunnel from Cloudflare the procedure should be the same.
To a large extent we will be following the steps of this page, but with a few small changes. Google Assistant - Home Assistant
You can also see the EverythingSmartHome video that explains practically the same thing as on the previous page.
Difference number 1: When creating the new project in console.actions.google.com, choose the English language no matter where you are from. (in the country choose the option that you like the most)
After this you follow the process as in the tutorial except that where you have to put the URL of your remote connection and your port you are only going to put the URL. Then, before starting the test, it is essential that you return to the overview screen and enter “Enter information required for the Actions directory”
In this section it is very important to complete the description, the profile image, the contact email and the Privacy and consent policy.
I leave you what @Omnipius very kindly gave in the community that is perfect for what we need:
For the description I wrote:
Short: “Connect Google Assistant to a private Home Assistant server”
Long: “This Action is intended for personal use. It exposes smart home devices controlled by a local Home Assistant server to Google Assistant and by extension the Google Home mobile app.”
For the logo just upload the HA logo.
For the privacy policy, create a Google Doc that can be viewed by anyone with the link that says:
“This application is intended for the private use of its developer. Any unauthorized users who connect to this service should have no expectation of privacy or protection of their data.”
and in the contact a contact email and your nickname.
Once these data are completed, now we can click on the “Test” button.
In console.cloud.google.com we will also follow the steps of the tutorial with the difference that when creating the credential at the top of the page we will see a sign that says “Remember to configure the OAuth consent screen with information about your application” and there we click on “configure consent screen”
I’m not sure how necessary this part is, but just in case, I completed only the mandatory data and it worked, so I recommend you do the same.
(DO NOT UPLOAD THE IMAGE HERE, IF YOU DO IT WILL NEED A VERIFICATION THAT TAKES 2-3 DAYS)
After this once again we continue with the tutorial and in theory they should be able to link Google Home to HA correctly. At least that’s how it was for me.
It is very important that if you have any firewall rule configured in Cloudflare that you deactivate it at the time of linking and then to be able to activate them again I share a rule that enables google servers, this rule must be thanked to the reddit user @ krojack76.
I think that would be all that is necessary for any doubt, I remain at the disposal of those who need it.