Mqtt Light Question

Hello all, I new to HA, making the transition from Openhab.

I started integrating some mqtt lights that I own, and have a question!

In the mqtt light, the color temperature is a number from 1 to 500,and I would like it to be submitted in a different way! In openhab I had the ability to declare transformations and assign them to a mqtt publish! That would change the value to be submitted any way that I wanted! Is this possible in HA? I would like for example to modify the value from the color temperature, where 1 would be 1,but 500 would be 100, all the values in the middle would be converted accordingly!

Is this possible?

Thank you all for the help and hard work

Have you looked at this:

or maybe better this:

From what I understand, the template let’s me process different patterns in income mqtt messages, not outbound! What I intended was to manipulate the message on the outbound, leaving HA!

I think you might be able to use a template light component, with the MQTT publish service and a data template to send different messages. It will take some working out though.