Value to Name

have connected an esp32 with a brink flair 300 via modbus which works fine now i get data as numbers now i want to convert the numbers to text like
1 = off
2 = low
3 = normal
4 = high
so i get in ha speed = low

How can it be done ?
Thanks a lot !!

A template sensor.

do you have example ?

ESPHome website has many examples and is a gold mine. It has been a revelation to me and have used the examples there including templates