While there are many solutions around, it feels good to have designed, written and customized your own 😉
Still, to much customization is wrong, as it makes inter-working harder. That’s the reason why my current work focuses on simplify and make my firmware easier to integrate with hass.io.(and by it with Google Home).
While the work is still (and will be for quite some time) on-going, it looks pretty nice and it’s way more stable than expected.
For the gory details, you can check the source code: https://github.com/cipibad/mqtt_esp