Fan Speed Controls help

Need help with controls.

I have a fan that uses broadlink ir therefore there is no state from device directly.
Im moving all controls to home assistant therefore stateful controls will be on home assistant directly and there will be no physical/external controls for it.
Question is that i have a fan with the following controls: On/Off, Swing, Speed, Timer. How do i group all of this together such that they are not individual switches?
For buttons like speed how can i make them like a single button for the fan controls?
Currently i have the following:

     switches:           
       aircon:            
         friendly_name: "Room Aircon"
         command_on: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
         command_off: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
       fan:                
         friendly_name: "Room Fan"
         command_on: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
         command_off: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
       fan_speed:          
         friendly_name: "Room Fan Speed"
         command_on: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
       fan_swing:          
         friendly_name: "Room Fan Swing"
         command_on: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
         command_off: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'