I was able to piece it together. Thanks for the idea.
Here’s the basic flow:
[{"id":"7e4a9200.df31fc","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"33ca4380.2a775c","type":"server-events","z":"7e4a9200.df31fc","name":"Check for ZigBee events","server":"8eacddf5.e8655","event_type":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":150,"y":140,"wires":[["9de00da1.24141"]]},{"id":"9de00da1.24141","type":"switch","z":"7e4a9200.df31fc","name":"Check for garage door events","property":"payload.event.device_ieee","propertyType":"msg","rules":[{"t":"eq","v":"aa:aa:aa:bb:cc:dd:ee:ff","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":440,"y":140,"wires":[["5df0b9e8.574f58"]]},{"id":"5df0b9e8.574f58","type":"switch","z":"7e4a9200.df31fc","name":"Check for z-axis events","property":"payload.event.args.attribute_name","propertyType":"msg","rules":[{"t":"eq","v":"z_axis","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":740,"y":140,"wires":[["7286cf65.b9afa"]]},{"id":"7286cf65.b9afa","type":"switch","z":"7e4a9200.df31fc","name":"Get z-axis value","property":"payload.event.args.value","propertyType":"msg","rules":[{"t":"gt","v":"900","vt":"num"},{"t":"lt","v":"150","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":970,"y":140,"wires":[["71220abd.37b524"],["4037010.4b64c"]]},{"id":"71220abd.37b524","type":"debug","z":"7e4a9200.df31fc","name":"Opened","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1180,"y":60,"wires":[]},{"id":"4037010.4b64c","type":"debug","z":"7e4a9200.df31fc","name":"Closed","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1170,"y":220,"wires":[]}]
Is the device_ieee
what I should be keying off of or should I use unique_id
to identify the device?
Too bad the entity for this device doesn’t expose the x, y and z axis directly, as we wouldn’t have to go to this length, and we’d know the initial state.