{"name":"Check DW Status","type":"virtual_device","properties":{"deviceIcon":0,"currentIcon":"0","log":"","logTemp":"","mainLoop":"","ui.Label1.value":"Raum: Buero-Türschloss Büro, Raum: Toilette-Fenster Gäste WC, Raum: Wohnzimmer-Terrassentür, Raum: Kueche-Küchenfenster, Raum: Garage-Garagentür, sind geöffnet!","visible":"true","rows":[{"type":"button","elements":[{"id":1,"lua":true,"waitForResponse":false,"caption":"Zeige offene Fenster und Türen","name":"Button11","empty":false,"msg":"selfId = fibaro:getSelfId()\nlocal IDs = fibaro:getDevicesId({ enabled = true, visible = true, baseType = \"com.fibaro.doorWindowSensor\" }) \nlocal dwStatus = '' \nfor i=1, #IDs do\n local DeviceValue = tonumber(fibaro:getValue(IDs[i],\"value\"))\n DeviceName = fibaro:getName(IDs[i])\n DeviceRoom = fibaro:getRoomNameByDeviceID(IDs[i])\n if (DeviceValue == 1) then\n dwStatus = dwStatus ..'Raum: '.. DeviceRoom..\"-\"..DeviceName..', ' \n end\n end\ndwStatus = dwStatus .. 'sind geöffnet!'\nfibaro:call(selfId, \"setProperty\", \"ui.Label1.value\", dwStatus) \n","buttonIcon":0,"favourite":false,"main":true}]},{"type":"label","elements":[{"id":2,"lua":false,"waitForResponse":false,"caption":"","name":"Label1","favourite":false,"main":false}]}]},"actions":{"pressButton":1,"setSlider":2,"setProperty":2}}