cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a simple automation script for checking the status of the front door in Google Home Script

SmittyG_31
Community Member

I have been trying to create a simple Google Home Script for checking the status of the front door (open / closed).

There are 3 voice starters I would like to use:

1. What is the status of the front door?

2. Is the front door open?

3. Is the front door closed?

 

I assume the conditional would check whether Occupied / Unoccupied (my magnetic door sensor from tp-link gets recognized as a presence sensor.)

 

The actions I would like are simple. Google Assistant should reply:

1. The front door is open.

OR

2. The front door is closed.

 

I have tried for hours to find workarounds because there is no functioning else clause...? And YAML hates having dulicate starters, conditions, and actions? Even ChatGPT And Gemini can't get this to work for me.

 

Can someone please help? Haha.

1 Recommended Answer

Suc1
Solutions Expert
Solutions Expert

I understand you're trying to create a Google Home Script to check your front door status with multiple voice triggers.

For Google Home Script, you'll want to use a single trigger block with multiple text variations rather than separate trigger definitions. This avoids the YAML duplicate key issues you're experiencing.

Could you share the specific YAML code you've already tried that's giving you problems with duplicate starters?

View Recommended Answer in original post

1 REPLY 1

Suc1
Solutions Expert
Solutions Expert

I understand you're trying to create a Google Home Script to check your front door status with multiple voice triggers.

For Google Home Script, you'll want to use a single trigger block with multiple text variations rather than separate trigger definitions. This avoids the YAML duplicate key issues you're experiencing.

Could you share the specific YAML code you've already tried that's giving you problems with duplicate starters?