Can't get MQTT auto-discovery to work, and the docs are confusing!

I have an ESP32 device which controls a string of lights (and my own custom code). I’ve done this before with a similar device, but … now I can’t get it to work again.

I’m publishing this to homeassistant/light/fairylights-anya02/config:

{
  "~": "homeassistant/light/fairylights-anya02",
  "retain": true,
  "name": "All LEDs",
  "uniq_id": "fairylights-anya02",
  "icon": "mdi:string-lights",
  "command_topic": "~/set",
  "state_topic": "~/state",
  "availability_topic": "~/online",
  "json_attributes_topic": "~/attributes",
  "brightness": true,
  "supported_color_modes": [
    "rgb"
  ],
  "schema": "json",
  "dev": {
    "ids": "4f:21:af:95:b5:48",
    "name": "Anya's Room Fairy Lights, Strands 2 & 3",
    "mf": "Matthew Miller",
    "mdl": "Mark 2"
  },
  "o": {
    "name": "fairy lights",
    "sw": "Mark 2"
  }
}

This creates the device properly, but without the light switch entity:

I know that there is now “device discovery”, which sends all entities at once, but “single component discovery” should still work, right? The basic example for a light seems unchanged.

What am I missing?