The ULP is used to sample a rotary encoder. The wifi will be initialized after quadrature counter has changed or push button was pressed. The result will be send via MQTT.
The ESP32 can replace the Bluetooth controller in the YLKG08YL- Yeelight Smart Dimmer Switch.