Mi Gateway light (on/off/brightness)

It seems that home assistant controlling the the light via brightness (switching light off means setting brightness to 0) … but that results in non working automation in mi home app, cause it enables the light, but cause brightness is 0, it isn’t visible.

HA 0.108.6

       key: ***