No, no, the pull down resistor and the caps are two separate things. The former is a necessary part of the way this PIR sensor (the Panasonic one) operates. The caps are to stabilize the noise created by the ESP on the power lines.
The PIR sends its output signal over what is called an open drain mosfet. That’s the symbol with the S/G/D letters on your schematic above. When the PIR triggers, a signal runs from the +3.3V into the source (S
), through the mosfet, out of the drain (D
) and into the out
pin of the PIR. But it stops there. You need to provide a way for it to flow to ground from there, so that the circuit is closed. That’s where the resistor comes in. It ‘pulls’ the signal to the ground, hence the pull-down name. So you need a resistor from out
to ground, in addition to the ESP pin. The PIR is not able to provide more than 100µA on this path, or the internal mosfet can be damaged. So the resistor needs the right size. At 3.3V and 100µA, this means that the resistor may not be smaller than 33kΩ, preferably more to give some headroom.
Now most microcontrollers, including the ESP, provide internal pull-down resistors that can be enabled or disabled. If these internal pull down resistors are at least 33kΩ, then you can use them instead of adding an external one. For that to work, the internal resistor needs to be enabled in the firmware. I don’t use ESPHome myself, so I don’t know how that works (but there’s most likely a way). But you also need to make sure (and that is very important !) that the resistor is not smaller than 33kΩ, or you will damage the PIR. I don’t know the size of the pulldowns on ESPs (I don’t use ESPs myself). A quick Google search gives this result. It says:
The values of the pull-down and pull-up resistors vary from chip-to-chip and pin-to-pin and for the ESP32 are typically in the range of Rup = 30 … 80 kΩ and Rdn = 17 kΩ (pull-down).
That’s not good. 17kΩ is going to generate constant false positives or worst case kill the PIR. So you will have to add an external pulldown resistor instead and make 100% sure that the internal pull down is disabled.
Next the caps. They are set in parallel to the +3.3V and the GND line. There’s an example in the PIR specs:
The reason for these is to suppress fluctuations and noise on the power lines. We call these decoupling capacitors. The ESP is a chip that generates a very large amount of wideband electrical noise (EMI). Due to inadequate noise suppression techniques in the ESP chip (because you know, cheap cheap cheap…), that noise back-propagates into the power lines and contaminates all other devices directly connected to it. The decoupling caps can absorb and short-circuit part of that noise, cleaning up the power at least to some extent.