Tuya door sensor - external sensor

Take a look here:

There is plenty of information, even for the new ones that have a hall sensor instead of a reed sensor.