habe ich in einem anderen Forum eine QA geschrieben und veröffentlicht, darf ich hier aber wohl nicht nennen. Aber mein Skript (ist ein QA)
function QuickApp:onInit()
self:debug("onInit")
end
function QuickApp:Protection1ON()
api.post("/devices/99/action/setProtection",
{
args = {"2",0}
}
)
end
function QuickApp:Protection2ON()
api.post("/devices/314/action/setProtection",
{
args = {"2",0}
}
)
end
function QuickApp:Protection1OFF()
api.post("/devices/99/action/setProtection",
{
args = {"0",0}
}
)
end
function QuickApp:Protection2OFF()
api.post("/devices/314/action/setProtection",
{
args = {"0",0}
}
)
end
function QuickApp:turnOn()
self:Protection1ON() --ZWAVE Elternteil Bad_oben
self:debug("Licht Bad_oben gesperrt")
self:updateView("label2", "text", "Licht Bad_oben gesperrt")
self:updateView("button1", "text", "betätigt")
fibaro.sleep(200) --Anzeigezeit für betätigt
self:Protection2ON() --ZWAVE Elternteil Bad_unten
self:debug("Licht Bad_unten gesperrt")
self:updateView("label3", "text", "Licht Bad_unten gesperrt")
self:updateView("button1", "text", "betätigt")
fibaro.sleep(200) --Anzeigezeit für betätigt
self:updateView("button1", "text", "Nachtsperre EIN")
self:updateProperty('value', true) -- binary switch ein
end
function QuickApp:turnOff()
self:Protection1OFF() --ZWAVE Elternteil Bad_oben
self:debug("Licht Bad_oben entsperrt")
self:updateView("label2", "text", "Licht Bad_oben entsperrt")
self:updateView("button2", "text", "betätigt")
fibaro.sleep(200) --Anzeigezeit für betätigt
self:Protection2OFF() --ZWAVE Elternteil Bad_unten
self:debug("Licht Bad_unten entsperrt")
self:updateView("label3", "text", "Licht Bad_unten entsperrt")
self:updateView("button2", "text", "betätigt")
fibaro.sleep(200) --Anzeigezeit für betätigt
self:updateView("button2", "text", "Nachtsperre AUS")
self:updateProperty('value', false) -- binary switch aus
end