MQTT JSON configuration in homeassistant core on WSL

I am trying to add MQTT JSON from configuration.yaml in homeassistant core running on windows WSL

  broker: <IP ADDRESS>
  port: 1883
  - switch:
      unique_id: Motor2_Switch
      name: "Motor Switch"
      state_topic: "<topic>"
      command_topic: "<topic>"
      payload_on: "ON"
      payload_off: "OFF"
      state_on: "ON"
      state_off: "OFF"
      qos: 0
      retain: true

Note value from state_topic is in following json format:
“ControlData”: {
“DeviceID”: “G4SOWRP2”,
“ControlType”: “AUTO”,
“Motor1Status”: “OFF”,
“Motor2Status”: “OFF”,
“Motor3Status”: “OFF”

The switch isn’t appearing in UI. Need help in this regards.