Mi Smart LED Ceiling Light (MJXDD01SYL)

Hi everyone,

I’m trying to configure a similar solution that Mi Home app has with this kind of lamp. You can create 3 different light modes and when you turn on/off the light, it will move the next brightness/temperature pair.
(First of all, finally, I could turn on the LAN Control feature. If someone struggling with it just download an older version of the Yeelight app on Android where this feature is not removed.)

I’ve created an automation that is triggered if the light is turned on. It works perfectly if I turn on the light via Home Assistant, but when I use the wall switch, which is in flex switch mode, then the state of the light is not changing for 3-30 seconds. I’m using HASS Xiaomi MIot for integration. Am I doing something wrong, or it is not working properly with flex switch mode?
EDIT: comparing to Yeelight C2001C450. Yeelight works smoothly with the flex switch in the same situation.

Thanks in advance.

This light uses polling to get the state changes. The polling interval(1-30 sec) can be set via customize.yaml or during the integration process if you add the lights individually. Unfortunately, the minimum scan interval is 1 sec, so it never will react immediately.
Xiaomi Miot Auto: Cusomize entity