This sensor I bought from a chinese site made me loose about a day of work to get it up and running. At first glance it could be attributed to wrong documentation, this page in particular: https://esphome.io/components/sensor/jsn_sr04t
but I actually think that at the time of writing this particular board was not yet around, and then the chinese made a mess with the naming.
TLDR: this board (SR04M-2) has to be configured as a JSN-SR04T, from the resistor to set the operating mode, to the YAML
This is the relevant part of my working config (Mode 1 and heavy filtering to slow down the rate, prioritizing having no outlyers):
I soldered a 47k resistor to get into Mode 1, lots of data that I then can filter a lot to mitigate outlyers. I’m planning to try Mode 2 by soldering a 120k resistor or another board.
I’m using too a ESP8266 (nodemcuv2), but it’s not relevant