Looks like lots of useful information in this thread:-
https://community.home-assistant.io/t/how-to-work-with-hlk-ld1115h-and-wemos-d1-mini-for-human-presence-detection