I'm trying to write a script that that wil turn on/off some other devices.
The script is working so far with 1 condition but i would like that the script works with multiple conditions.
The script i have so far is:
Code: Select all
return {
on = {
devices = {23,9} ,
timer = {'at 08:00-07:00'}
} ,
execute = function(dz, item)
if item.state == "On" then
dz.devices(13).switchOn()
dz.devices(11).switchOn()
dz.devices(8).switchOff()
dz.devices(6).switchOff()
dz.devices(7).switchOff()
end
end
}
-- if domoticz.devices(23).state == "On" and domoticz.devices(9).state == "On" then
-- if domoticz.devices("Thuis").state == "On" and domoticz.devices("Telefoon opladen").state == "On" then
Beneath the script are some other statements if tried but those did not work.
Thank you