Help with mqtt and brightness to control a lamp

Hello,
I need help with controlling the brightness via mqtt.
i am completely new to home assistant used domoticz before but they have no support for new ikea dirigera.
I manage 90% of everything with nodered and mqtt.
what I want to do is send only the brightness from nodered mqtt to home assistant to be able to control the ikea lamp. I need step by step help, I’ve tried everything possible and the only thing I succeed in is turning the lamp on and off but not setting the brightness. i have read every help in docs with mqtt light
but no luck.

/D

Once you set the device up as a mqtt light in ha, you will be able to control brightness with the usual service calls.

Yes, easy for you, but i need visual to se how it works.
An example for full code and where to put those.

In automation i only have light.turn.on or off or increase or decrease brightness. Where do i actual put the mqtt numbers and how to interact with ikea lamps.

In domesticz they are using idx numbers to identify every light/switches or what ever.
Then you only have to send mqtt to the right idx and the value.

How did you incorporate the light into HA in the first place?

Apple Homekit bridge, and the lamps where there. No other lamps or switches. I only need it to use the new ikea dirigera for now. And in the future i will use home assistant dashboard and replace my siemens runtime hmi.

All other zwave, esp, sensors and alarm is controlled by nodred and my siemens plc simulator with HMI.

Presumably you have a light.xxxxx entity as a result. What are the attributes of that entity? Go to developer tools/ states.

Example for one room it is named:

Light.frontright
Light.frontleft
Light.backright
Light.backleft

What are the attributes? You have only given the entity name.

Sorry you lost me there, where do i find that ?

Like I said.

Oh you are on a mobile device I guess from the look of those screens. Click on the name of one of those devices and at the top of the page the state and all attributes will appear. Like this

min_color_temp_kelvin: 2202
max_color_temp_kelvin: 4000
min_mireds: 250
max_mireds: 454
supported_color_modes:
  - color_temp
icon: mdi:lightbulb
friendly_name: Spot höger bak
supported_features: 0

supported_color_modes:
  - brightness
friendly_name: Väggspot verkstad vänster
supported_features: 0

Somebody ?

When you use the service light.turn_on you can choose brightness. That is true in both HAs native automations and node red.