Get state_white value for light

I’ve been struggling to get a RGBWW led strip working. This one has two endpoints, one for rgb and one for white. However the state endpoint is the same for both but the value for the white leds is ‘state_white’. I thought this would be easy to configure by template value logic but it seems the docs are outdated.

My light config is like this

  - platform: "mqtt"
    name: "ledstrip_white"
    command_topic: "zigbee2mqtt/0x00124b001d04d7e2/white/set"
    availability_topic: "zigbee2mqtt/bridge/state"
    state_topic: "zigbee2mqtt/0x00124b001d04d7e2"
    value_template: '{{value_json.state_white}}'
    brightness: true
    schema: "json"

At first i tried (as the docs state) state_value_template, but this gave a misconfigured error and HASSIO states this is deprecated. I also tried
value_template: "OFF". But it stays on whenever my rgb led is activated. So somehow I cannot change where to fetch the correct state.

Is there something missing in the docs or am I overlooking something obvious here?

The documentation indicates state_value_template is a valid option for the default schema. You are using the JSON schema which doesn’t support that option. That’s why Home Assistant reported a configuration error.

MQTT Light supports three types of schema. They have many options in common but there are differences (as one would expect).

Please post a sample of the MQTT payload sent from the light to Home Assistant. Does it look anything like what the JSON schema expects (see sample in the documentation)?


EDIT

If you review the documentation for MQTT Light’s JSON schema, you’ll notice there’s no mention of a value_template option. It expects the received payload to be in a specific format. If your light’s payload is not in this predefined format, you will probably need to use the Template schema.