Create template showing on-entities in order of usage

HI,

Id like to display a Tile with the icon of a switch in a bigger group of switches. In that group switches can be ‘on’ simultaneously and in that case I need it to show the switch using the highest wattage, based on a sensor.

group:
  laundry:
    switch.sw_wasdroger_bijkeuken_template
    switch.sw_wasmachine_bijkeuken_template
    switch.sw_boiler_bijkeuken_template

relevant sensors:

sensor.wasdroger_bijkeuken_actueel
sensor.wasmachine_bijkeuken_actueel
sensor.boiler_bijkeuken_actueel

How do i circle this loop (or is it even done best with a loop?)

please have a look and throw me a hint.
Thx!
Marius