I pretty much followed the link posted earlier by @Rofo. The latest update 2023.03.0 broke it but there has already been an update on the git page to fix it (I can confirm it works). https://github.com/zigpy/zha-device-handlers/pull/1928
In short, you need to create a new folder called custom_zha_configs in your main HA config folder using something like Studio Code Server. Then create a new file called ts601_motion.py and copy and paste the latest code from the above link (use the copy button when you hover over the code in the top right).
Then in your config file in HA, you need to add the below (“zha:” should already be there if you’re using it so just an indented line after that bit)
zha:
custom_quirks_path: /config/custom_zha_quirks/