Tuya WiFi Switch Snippet
![](https://robothuis.nl/wp-content/uploads/2019/08/cropped-login-protection.jpg)
-- Kroonluchter aan/uit schakelen via IFTTT en Tuya/Smart Life return { on = { devices = { 'Kroonluchter' } }, execute = function(domoticz, device) if (device.state == 'On') then domoticz.openURL({ url = 'https://maker.ifttt.com/trigger/Kroonluchter_aan/with/key/aBc0DEFGHIjklmnopQRStuVwxYZA234BcDEfGHijklM' }) domoticz.variables('kroonluchter_status').set("Aan") else domoticz.openURL({ url = 'https://maker.ifttt.com/trigger/Kroonluchter_uit/with/key/aBc0DEFGHIjklmnopQRStuVwxYZA234BcDEfGHijklM' }) domoticz.variables('kroonluchter_status').set("Uit") end end }