
For this flow to work you need:
- a Zigbee PIR
- a Zigbee switch
- a working MQTT server and
- the Zigbee2mqtt nodes

Go to the menu (3 tripes on the top right) en choose >Manage Palette. Choose the install tab en search for “zigbee2mqtt”. The first option is called “node-red-contrib-zigbee2mqtt”. Install that one. If everything goes well you now can see the 4 new nodes on the left at the bottom.
STEP 1 Drag the “in node” to the canvas. And add the following data:

STEP 2 Drag a switch node to the canvas and add this data:

STEP 3 Drag 2 change nodes to the canvas and add this data:


STEP 4 Add a “out node” to the canvas and put this data in, to actually turn the switch ON of OFF:

Now this closet light should be working.