With the integration of tuya/smartlife can devices trigger variables? All questions

With the integration of tuya/smartlife could it be possible for a device status to trigger a variable?

An example being my downstairs lights trigger at dusk if someone is home. But I want to be able to stop this happening if a light or group of lights are on upstairs.

let me know your thoughts Derek.

Asked by Hdsn5555 on June 24, 2020, at 8:32pm (edited on June 24, 2020, at 8:33pm)

Reading your question, I think what you're actually after is a new condition type rather than trigger. You will use the existing sunset/time based trigger, and then need a new condition to check the status of your other device. This can be achieved using the Tuya API and is something I can add in the next few days.

In terms of triggering sequences from devices, someone else had asked about this, and right from the begging I had hoped it would be possible. I've been in discussion with the Tuya support team and while it doesn't seem possible directly via their API they have provided some information which might solve this. I need to spend some time picking through the info to see what will or won't be possible and will get back to you.

Exactly that. Thanks again Derek, if you need any testing let me know.

The other reason for my query is I have a Tuya/Smartlife door sensor, it would be interesting to see what I could use it for in terms of triggering other devices/variables.


great to hear that!!

I have also a smart siren from Smart Life with Temp. and Humidity sensors embedded. I am trying to use the T value (or better the alarm status linked to the T) as a trigger for IFTTT Daikin Applet and to let the aircon to be stopped or started according to the T value....

Do you think it would be possible?

Thanks again

I'm going to need to pick through the Tuya documentation a bit more before I can answer that unfortunately. I'll post back here in a couple of days once I've understood what will be possible.

Hi Dan, I've now added a Tuya Smart Life condition step which should be available for you to test. It only works for devices as scenes don't have a status and devices within a group can have different statuses.

Give it a try and let me know how it goes.

This looks like it will work exactly how I expected so thanks, I've a couple of grouped devices for example ‘bedside lights' these are smart bulbs so I'm guessing have more than an on/off status.

for the sequence to work, I could always ask it to check the value of of one of the bedside lights, as 99% of the time both are on.

Yes, I think that will be the best way to achieve it, just pick a single device.

For something that has a numeric value I will also be adding less than and greater than over the weekend.

I've just carried out some testing, the sequence seems to be running correctly but even with a device on/off it still seems to run the sequence? When it should stop unless the device is off.

I've figured out what the issue was, it wasn't nested correctly.

My lights on at sunset sequence is starting to feel a little more complex now, with its check for weather conditions and delaying triggers based on 4 weather types, then it checks if anyone is home, then it checks if a device upstairs in on before triggering my smart life scene 'Downstairs on' however, regardless of this device status it will still trigger 'some_one_home' which activates the porch light.

Thanks for all your efforts Derek, there is some rapid development and changes here allowing this to be possible.

That's great to hear Dan! I'm glad the code is working. For anyone else interested this functionality will be available more broadly from tomorrow. Also keep an eye out for a survey in the next week to gather some feedback to help guide future features.

While it's currently not possible to trigger a sequence from your Tuya device (I'm still investigating this with the assistance of the Tuya help desk), you can now add conditions in your sequence to check the status of your device.

Depending on the device, this could be to check whether it's on or off, the current power or voltage, the colour of a light etc. You'll find it in the steps as Tuya Smart Life devivce status, and there's some more info here in the docs.

If you get stuck or need help, contact me or post a new question.

I'm please to announce there is now built in weather functionality in SEQUEmatic.  You can use it either as a condition or as a trigger.

Post a reply

The SEQUEmatic bot is still new and learning. If you don't get the answer you need, just ask to speak with Derek and your chat will be transferred.