Template Fan for mechanical ventilation, need help

Hi, I need some help to create a Fan entity by using the Template fan integration.

I have 3 switch entities from a ESPhome device, the combination of which relay is turned on determine the fan speed.

Off

  • switch_01 → off
  • switch_02 → off
  • switch_03 → off

Low

  • switch_01 → on
  • switch_02 → off
  • switch_03 → off

Medium

  • switch_01 → on
  • switch_02 → on
  • switch_03 → off

High

  • switch_01 → on
  • switch_02 → off
  • switch_03 → on

Is it possible to uses these switches in the Template Fan integration? or do I need to create some other entities first so these can be used in the template? My goal is to create a Tile card that controls my Fan (mechanical ventilation) like in the image below