Just noticed this post: Smart light switch based on ESP8266
Tutorial so to speak on building an mqtt ac switch. FYI.