Tasmota is an incredibly powerful alternative/open source firmware for the ever popular Espressif family of WiFi equipped microcontrollers. This does not need to be another post espousing it’s many awesome qualities, so just trust me on this; Tasmota is AWESOME. Tasmota supports user configurable rules which are simple commands wired into various device triggers. In short; a device running Tasmota gains some autonomy to react to events without needing to report the event to, and wait for commands from, a remote server.
The HASwitchPlate project by aderusha is brilliant. He’s managed to arrange some relatively cheap commodity hardware into a package that conveniently fits into a prime location for interacting with Home Automation - the light switch. The entire package sips power off of the already present mains wiring and connects to any MQTT broker via the esp8266 chip. As the HASP was designed to be used with Home Assistant, the humble 2.