Mapping actual fan speed to an attribute of a fan entity

Hi everyone,

I recently added the IKEA air purifier to Home Assistant via Zigbee2MQTT, and I noticed an issue with the fan speed not displaying correctly when the fan is set to auto.

It seems that the percentage attribute doesn’t update to reflect the actual fan speed:

preset_modes: auto
percentage: null
percentage_step: 11.11111111111111
preset_mode: auto
supported_features: 57

The actual fan speed is exposed in a separate sensor sensor.ikea_air_purifier_fan_speed, where I can see the original fan speed value 1 instead of a percentage. Because of this issue, I can’t use a tile card to display the actual fan speed directly.

Is there a way to map the actual fan speed to the percentage attribute within the main entity or possibly to a new attribute? I’m aware that a template fan could work, but I’d like to explore other options to avoid creating duplicate entities.

Thanks in advance for your help!