- To link Google Assistant to the Home Assistant there are many ways: IFTTT, Google Cloud, Component. Each option will have its own advantages and disadvantages:
- IFTTT is easy to customize according to your needs, commands and optional responses. Even the entities that Cloud does not accept, can still set up IFTTT. In return, due to the setup of each device, it will take time.
- Home Assistant Cloud service will help you to easily synchronize devices. And an important point is that for Cloud, you don’t need any domain or SSL and still use it with Google Assistant. This is the difference.
- Using component will be completely free but also use features like Home Assistant Cloud but setup is also lengthy.
- While using a long component, it’s free, so let’s just use it. In the framework of this article, I will guide you to use google_assistant component to synchronize devices in your HASS
- Hass was added the domain and enabled SSL
- App test link creation: https://console.actions.google.com/?pli=1
- API creation link: https://console.cloud.google.com/getting-started?pli=1
- Google Home App on the phone
Visit link: https://console.actions.google.com/?pli=1
You do it exactly in the order of the pictures!
Create a project
Terms of service – AGREE AND CONTINUE
Select Home control
Select Smart home
Select Add Action (s)
Chọn ADD YOUR FIRST ACTION
https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant” and press DONE.
Select Overview to return
Select Setup account linking
Select No and click NEXT
Chon OAuth => Authorization code => NEXT
Client id: https://oauth-redirect.googleusercontent.com/
Client secret:Any input is fine
Authorization URL: https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize
Token URL: https://[YOUR HOME ASSISTANT URL:PORT]/auth/token
Nhập email => ADD SCOPE => name => ADD SCOPE
What is the entry => SAVE
No => Test => Simulator
Select VERSION – Draft => DONE
This is the end of the APP TEST creation section.
API Services => Library
Find Google cloud api console
Select API key
Congratulations on getting the API key !!!
LUY PROJECT ID
Jag icon => Project setting
project ID has appeared you save for use for the lower part!
EDIT CONFIG FILE IN HASS
Add the following code into your configuration.yaml file
google_assistant: project_id: YOUR_PROJECT_ID api_key: YOUR_API_KEY exposed_domains: - switch - light - group