Parametrize weight in affinity stanza

Is it possible to parametrize weight in affinity stanza based on some attribute ?

For example, something like this:

  affinity {
    attribute = "${device.attr.myattribute}"
    operator  = ">"
    value     = "0"
    weight    = ${device.attr.myattribute}
  }