Home Assistant is one of the best open-source home automation software platforms around.

To do so, you canexpose your Home Assistant server with SSL using DuckDNS and Lets Encrypt.

Alternatively, you canset up a Cloudflare Tunnel to expose your Home Assistant server to the internet.

A Google Home smart speaker

We recommend the latter method as its more secure and much easier to set up.

tap the hamburgermenu (three lines icon) on the left and chooseAPIs and services>Credentials.

ClickCreate Credentialsand chooseService account.

enter the project name

key in a name for the account and clickCreate and Continue.

From theRole list, chooseService Account Token Creator.

Next, go for the service account you just created and then select theKeystab.

open the project settings in google console

Then clickAdd Key>Create new key.

A JSON file containing keys will download on your system.

Rename the file asSERVICE_ACCOUNT.json.

enter the oauth client information

Once keys are generated, copy the key to the Notepad.

Use the search bar to find and switch on the HomeGraph API.

Edit the Home Assistant Configuration File

Choose theSERVICE_ACCCOUNT.jsonfile (downloaded earlier) and clickOK.

test the service

Next, hit theConfiguration.yamlfile and paste the following code.

ensure to replace theYOUR_PROJECT_IDvalue in the above code with your own and click theSaveicon.

Then click onDevelopers Tools>Check Configurationto ensure the configuration is valid.

open api services in google cloud console

If everything looks good, restart the Home Assistant server.

Tap on the+icon and chooseSet up rig>Works with Google.

Choose[test] Home Assistant(or whatever name you have given to the project).

enter service account details

This will open your Home Assistant web page.

Enter the Home Assistant login credentials and tapLogin.

You will see a message, “Home Assistant linked”.

enable homegraph api in google cloud

Next, the app will show all the entities configured in your Home Assistant server.

You will see all your rooms and the devices in them in the Google Home app.

it’s possible for you to now control all the devices from the app and use Google Voice Assistant.

upload service account json file

you’re able to also set up automation using the Google Home app based on various parameters.

The steps are as follows:

From there, chooseAdjust Home devices.

Then choose the smart devices that are configured in Home Assistant and select further options.

edit configuration yaml file in home assistant

TapAdd action, thenSave.

select home assistant from the list

tap on works with google

choose setup a device

control-all-home-assistant-entities-in-google-home-app

all devices from home assistant added to google home app

ask google assistant to switch on off home assistant lights switches

google voice assistant turned on light

tap routines to setup automation

choose adjust home devices

creating automation in home assistant

tap add action

save the automtion google home app