Need help with esphome Please

hey,
What code lines should I write in esphome in ha
to use this sensor?

i guess it you can try binary sensor

That would depend on what you want to do with it. See:

And

And

this sensor should act as ultrasonic sensor.
It sends ir and receive it.
I can’t find this sensor in esphome to use their template code.

Oh. It’s only a distance sensor, looks just like an ir transceiver I have. Then the first suggestion by Gijs is correct.

Just hook it up to a pin and see what happpens it should only be on or off

thanks!
got it work