I have an rcwl-0516 radar motion sensor hooked up to a nodemcu esp32 as a gpio binary sensor. I’ve verified it’s working and low latency with a multimeter, but the view in home assistant seems more random. I’m guessing it’s due to the 60s polling from home assistant.
I’ve tried searching for what the latency rules are but haven’t figured it out. Each sensor has a polling number,
but but home assistant also has a polling interval, right? Or does the esp device somehow tell HA how often to poll? And way to send an edge-triggered message instead of polling? Would I be better off with mqtt?
The exactly same is also true for the API. For binary Sensor esphome uses push (no matter mqtt or the native api).
Just one thing to bear in mind are battery based device which wake up from deep sleep or just booting new. The api can take up to 30 seconds (poll interval for home assistant to connect initnially to eshpome nodes native api) and therfor mqtt (as the broker is a available right after WiFi connect) is still the way to go for time critical battery powered devices. But I can tell that there is something in the making to expand the native api to be handle setups like this in the future