Mqtt default - missing brightness_command?

I’m just trying to implement Shelly Bulb RGBW using mqtt integration. The bulb offers RGB and CCT modes. While mqtt integration offers 3 schemas: default, json and template, only the first two supports the “Mode”. Json is useless since it requires specific json structure for communication with the device. Thus only “default” remains.

With mqtt default schema I can achieve almost everything, except I found there is missing a way how to set brighntess otherway than assigning value to the topic. All other parameters (state, mode, rgb, warmth) allows defining pattern to be used for passing them. But not brightness. I would expect existence of color_temp_command_template but it is missing from specification (and is reported as unsupported when trying to use it)

Am I missing something? Is there any other way to pass brightness?
Here is structure I need to pass values to:

topic: shellies/shellycolorbulb-<deviceid>/color/0/set

{
    "mode": "color",    /* "color" or "white" */
    "red": 0,           /* red brightness, 0..255, applies in mode="color" */
    "green": 0,         /* green brightness, 0..255, applies in mode="color" */
    "blue": 255,        /* blue brightness, 0..255, applies in mode="color" */
    "gain": 100,        /* gain for all channels, 0..100, applies in mode="color" */
    "brightness": 100,  /* brightness, 0..100, applies in mode="white" */
    "white": 0,         /* white brightness, 0..255, applies in mode="color" */
    "temp": 4750,       /* color temperature in K, 3000..6500, applies in mode="white" */
    "effect": 0,        /* applies an effect when set */
    "turn": "on",       /* "on", "off" or "toggle" */
  "transition": 500   /* One-shot transition, `0..5000` [ms] */
}

And definition of my mqtt light so far (note missing template for brightness command while existing for other attributes):

  - platform: mqtt
    name: "Bulb4test"

    command_topic: "shellies/bulb4/color/0/command"
    state_topic: "shellies/bulb4/color/0/status"
    state_value_template: >
      {% if value_json.ison -%}
      on
      {%- else -%}
      off
      {%- endif %}
    payload_on: "on"
    payload_off: "off"

    rgb_command_topic: "shellies/bulb4/color/0/set"
    rgb_state_topic: "shellies/bulb4/color/0/status"
    rgb_value_template: "{{ value_json.red,value_json.green,value_json.blue}}"
    rgb_command_template: >
      {{ '{ "mode": "color", "red": %d, "green": %d, "blue": %d }' | format(red, green, blue)}}

    color_temp_state_topic: "shellies/bulb4/color/0/status"
    color_temp_command_topic: "shellies/bulb4/color/0/set"
    color_temp_value_template: "{{ 1000000 / value_json.temp }}"
    color_temp_command_template: >
      {{ '{ "mode": "white", "temp": %d }' | format(1000000 / value)}}
    
    brightness_state_topic: "shellies/bulb4/color/0/status"
    brightness_command_topic: "shellies/bulb4/color/0/set"
    brightness_value_template: >
      {% if value_json.mode == 'color' -%}
      {{ value_json.gain }}
      {%- elif value_json.mode == 'white' -%}
      {{ value_json.brightness }}
      {%- endif %}

    color_mode_state_topic: "shellies/bulb4/color/0/status"
    color_mode_value_template: "{{ value_json.mode }}"
    
    availability_topic: "shellies/bulb4/online"
    payload_available: "true"
    payload_not_available: "false"
    
    qos: 1
    retain: false
    optimistic: false

BTW Shelly implementation distinguishes brightness for color and cct modes (see gain and brightness attributes). Even if color_temp_command_template would have been available, I’m curious how to set only one brightness depending on light mode.