Yep this is how I'm doing it. Combined with ESPHome I've got a nice, local-only automation system using sourceable off-the-shelf parts (but I'm so, so happy that Athom are making open-source flashed IoT devices - which go and live on my IoT network).