cancel
Showing results for 
Search instead for 
Did you mean: 

Tuya Door sensor not available to Home Automation

CristianoPC
Community Member

Hi,  I bought tuya smart sensor for door/Window. I successfully connected sensor to tuya smart app but, and successfully connected tuya app with my Google Home app.

But when I try to create routines for turning lights with options "When device does something" I can't find my door sensor.

 

Can u help me with this?

 

Kind regards,

Cristiano

1 Recommended Answer
7 REPLIES 7

DWB1973
Community Member

Contact sensors are not yet available as automation starter devices from within the GH app.  You will need to use the script editor before you will be able to select contact sensors as a starter device.

Tks a lot. Any suggestion how to start in this script? (Sites, video, any specif index? 'google script'?)

Thanks a lot!

10r10
Community Member

 

what am I doing wrong in these 2 scripts...I am unable to execute..Thanks

xxxx

metadata:
name: Pantry door Closes - Pantry lights OFF
description: Lights turns on when Pantry door closes
automations:
- starters:
- type: device.state.OpenClose
device: Pantry door - Doors
state: openPercent
is: 0
actions:
- type: device.command.OnOff
devices:
- Pantry - Kitchen
on: false

 

xxxxx

 

metadata:
name: Pantry door Opens - Pantry lights ON
description: Lights turns on when Pantry door opens
automations:
- starters:
- type: device.state.OpenClose
device: Pantry door - Doors
state: openPercent
is: 100
actions:
- type: device.command.OnOff
devices:
- Pantry - Kitchen
on: true

Eaw
Community Member

Found a workaround... You'll need a Tuya smart plug to do so.

Create a scene on Tuya app when door sensor is open it turns on smart plug.

And when door sensor is  closed it turns off smart plug.

Now in Google Home, create a routine with the smart plug as the starter, whether on or off.

Gauthier158
Community Member

You can do the same thing by creating a virtual device. 

tuto: https://thingsboard.io/docs/user-guide/integrations/tuya/