Automation make number to specific name

Hi I have a device that send me state 1-10 numbers I need to make an automation to show me depending on the number a specific name. How it’s possible

1- off
2- on
3- charging
4- battery off
Etc…

Welcome! :grin:

We need a bit more detail, I think. Presumably the “device” is a sensor of some kind? Is there an integration for it? Some integrations may already provide the sort of output you’re looking for.

When you say “show me” do you mean on a dashboard, or what?

What’s your experience with HA? In the absence of an integration, the most effective way of doing what you describe might be with a template, but that’s not for beginners.

I get data from my bike throw mqtt and a sensor report a number for the state of the bike. I would like to change the number into what the state is. ( Put it on a mushroom chip).
I haven’t use templates.