Ultrasonic setup with GPIO pins

I’m trying to directly connect a Waterproof Ultrasonic Module JSN-SR04T to the raspberry GPIO pins with home assistant on it. I cannot figure out how to add it in the configuration.

Technically, you need to trigger the sensor with a momentary switch (quickly on, then off, to create a pulse) and then read the voltage on the echo pin, but the GPIO integration in HA doesn’t support that (only binary sensors). But, even if it did, I think you’ll have a ton of automations on the HA side and your measurements will be off due to timing issues.

I’d say connect this to an ESP and use ESPHome.

Alternatively, look for a Python library and create a script with a cronjob or something to utilise the sensor and post the result to HA using the HA API.