[Help] Gledopto dimming automation

Hello,

I have home assistant on an pi2 with hassbian. Using zigbee2mqtt i can control my light and i can see my sensors.

I want to write an automation script that increase brightness of my gledopto (dimmer) when i rotate my xiaomi cube to right.

I’ve found something intresting, my gledopto dimmer is detected with 2 entitys, one is the light and another one is a sensor (link quality) . All the attributes including brightness are present in the sensor not in the light.

This is what i mean:
https://i.imgur.com/py5WrgH.png
https://i.imgur.com/m86pISj.png

After noticing this i try to adapt my script accordingly, but without success, tried also directly in to yaml, but it seems to not make any difference.

This is how my action section is looking right now:

But it still dont make any change to my light when i trigger it. Any help would be highly appreciated.

Update: When i try to set the brightness to a value, ex: “brightness” : “50” it is working, so the problem is the value of actual brightness.