23/01/2026 MQ-2 Sensor with ESPHome and ESP32: Safe Updated Guide Connect an MQ-2 sensor to an ESP32 with a safe voltage divider, current ESPHome YAML, and Home Assistant. This project is not a certified gas alarm.