Tuya WiFi Switch Snippet

Gepubliceerd door Robot One op

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- 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
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Categorieën: