Thanks dear, I did this but I think something wrong in properties.
[{"id":"2e45c55a.3f5a9a","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"b2e75d23.76c79","type":"switch","z":"2e45c55a.3f5a9a","name":"","property":"switch","propertyType":"flow","rules":[{"t":"eq","v":"1","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":300,"wires":[["31b3a052.11085"]]},{"id":"dea77158.0c85e","type":"change","z":"2e45c55a.3f5a9a","name":"","rules":[{"t":"set","p":"switch","pt":"flow","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":200,"wires":[[]]},{"id":"31b3a052.11085","type":"debug","z":"2e45c55a.3f5a9a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":890,"y":300,"wires":[]},{"id":"d7a923e9.37ae8","type":"rpi-gpio in","z":"2e45c55a.3f5a9a","name":"PIR","pin":"40","intype":"tri","debounce":"25","read":false,"x":520,"y":300,"wires":[["b2e75d23.76c79"]]},{"id":"87a4d839.1a2448","type":"inject","z":"2e45c55a.3f5a9a","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":530,"y":160,"wires":[["a342e74e.6eb728"]]},{"id":"5a7cc885.900f88","type":"inject","z":"2e45c55a.3f5a9a","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":530,"y":220,"wires":[["a342e74e.6eb728"]]},{"id":"a342e74e.6eb728","type":"ui_switch","z":"2e45c55a.3f5a9a","name":"","label":"switch","tooltip":"","group":"58e3d701.906d18","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"switch","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":690,"y":200,"wires":[["dea77158.0c85e"]]},{"id":"58e3d701.906d18","type":"ui_group","z":"","name":"Status","tab":"89444d46.a9eb6","order":1,"disp":true,"width":"6","collapse":true},{"id":"89444d46.a9eb6","type":"ui_tab","z":"","name":"Lights","icon":"fa-lightbulb-o","disabled":false,"hidden":false}]