All you need is an ESP32 board and some tinkering with ESPHome.
I've been playing around with a couple of ESP32 microcontrollers, and that experimentation has taught me a lot about sensors and what you can build for really, really cheap. For as little as $4, you ...