After looking for how to configure the HLK-LD2410 and HLK-LD2420 presence detectors and seeing that there was little information, I started to carry out tests to try to configure them, from these tests I got these results:
I have managed to configure both, and if you look at the YAML files you will see that you have to change pins 20 and 21 depending on the sensor you are using, I don’t know if it is because of a bad definition of the pins on the boards I have or because they are poorly silkscreened, the fact is that they both work like this.
I have also made two sketches in Fritzing to put them into operation, the PCB has been designed, I currently have both of them working.
Both have a HLK-PM01 power supply of 5V and 0.6A and are powered at 220V alternating current, as I intend to place them attached to the ceilings I have and draw the power from these.
Since the 2025.7.2 update, ESPHOME stopped working if updated above that version of ESPHOME. For it to work, with versions equal to or higher than that, you have to change the pins to which the HLK-LD2024 is connected - tx_pin: GPIO07 and rx_pin: GPIO06. With the old configuration, it caused problems with the USB port.