Using Automation or Script to pass brightness setting to a lamp

Whenever an analogue input changes (0-100%) I want this sent to a lamp as the new brightness. The input has the following properties;

supported_color_modes: brightness
uuid: 1b0b7a54-0211-e94c-ffffa8ff444aa57c/AI1
room: 
category: 
device_typ: Dimmer
platform: loxone
max: 100
min: 0
device_class: Dimmer
icon: mdi:brightness-6
friendly_name: MusicRoomLamp
supported_features: 1

The output lamp has the following properties;

min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 500
effect_list: Music, Scene
supported_color_modes: color_temp, hs
scene_data: 000e0d0000000000000000c80000
friendly_name: MusicRoomLamp
supported_features: 4

I can create an automation to turn it on or off, but not to follow the input value.

I’d appreciate any help you can give me.

As an update to the above, when the lamp is ON, it has a few more properties, the full set listed below;

min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 500
effect_list: Music, Scene
supported_color_modes: color_temp, hs
scene_data: 000e0d0000000000000000c80000
friendly_name: MusicRoomLamp
supported_features: 4
color_mode: color_temp
brightness: 255
color_temp_kelvin: 2427
color_temp: 412
hs_color: 29.074, 75.232
rgb_color: 255, 156, 63
xy_color: 0.554, 0.389