MQTT Light Brightness and RGB

Hi!

I’m trying to do my first project in Home Assistant, RGB lights using an esp8266.
Pretty much everything works except the card widget is kinda buggy.

When I turn the light on, the brightness slider is all the way to 0, no matter what the real value is.
image

because of that I cannot see the RGB picker until I change the brightness value.

Even worse, when the light is already on when I open the details view, I don’t even see the brightness slider. I need to turn the lamp off and on again to be able to see it.

image

my config looks like this:

mqtt:
  light:
    - name: "Nightstand Light 1"
      state_topic: "bedroom/nightstand1/light/status"
      command_topic: "bedroom/nightstand1/light/switch"
      brightness_state_topic: "bedroom/nightstand1/brightness/status"
      brightness_command_topic: "bedroom/nightstand1/brightness/set"
      rgb_state_topic: "bedroom/nightstand1/rgb/status"
      rgb_command_topic: "bedroom/nightstand1/rgb/set"
      state_value_template: "{{ value_json.state }}"
      brightness_value_template: "{{ value_json.brightness }}"
      rgb_value_template: "{{ value_json.rgb | join(',') }}"
      qos: 0
      payload_on: "ON"
      payload_off: "OFF"
      optimistic: false

Even the sketch from the documentation has this issue.

Is there a way to fix this?

Thanks!!