I’ve just got it working with ZHA, ZZH! stick from NodeRed.
So my sensor is modded and send motion every 5 seconds.
No need for additional software packages, custom python scripts, changing source code or whatever.
[{"id":"41a07519.2c219c","type":"ha-api","z":"758f5e2e.1884d","name":"HA set state Off","server":"e71e8d0c.3aedc","debugenabled":false,"protocol":"http","method":"post","path":"states/binary_sensor.nameofsensor","data":"{\"state\":\"off\"}","dataType":"jsonata","location":"payload","locationType":"msg","responseType":"json","x":360,"y":660,"wires":[[]]},{"id":"51b9334d.6018fc","type":"server-state-changed","z":"758f5e2e.1884d","name":"Motion detected?","server":"e71e8d0c.3aedc","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.nameofsensor","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":100,"y":540,"wires":[["41a07519.2c219c","4b879245.55f91c","3cb50b6.b5377f4"],[]]},{"id":"4b879245.55f91c","type":"api-call-service","z":"758f5e2e.1884d","name":"ZHA set attributes","server":"e71e8d0c.3aedc","version":1,"debugenabled":false,"service_domain":"zha","service":"set_zigbee_cluster_attribute","entityId":"","data":"{\"ieee\": \"00:15:CHANGEME\",\"endpoint_id\": \"1\",\"cluster_id\": \"1280\", \"cluster_type\": \"in\", \"attribute\": \"2\", \"value\": \"0\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":370,"y":600,"wires":[[]]},{"id":"3cb50b6.b5377f4","type":"api-call-service","z":"758f5e2e.1884d","name":"Test toggle light","server":"e71e8d0c.3aedc","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":540,"wires":[[]]},{"id":"e71e8d0c.3aedc","type":"server","name":"Home Assistant","addon":true}]