Device class on counter

Hello everyone, I created a counter from the HA interface. I need to add a device_class on this counter. It works from the dev tool (status) so I’m looking to modify the counter in the yaml file permanently but I can’t find this one.
Do you have any idea where to find the counters created from the interface?
Thanks for your help

That’s not how you do it. First, UI-created helper entities don’t have yaml entries (at least not ones that are generally considered user-editable). Second, device_class isn’t a standard attribute for counter entities, so you need to add it as a custom attribute in configuration.yaml.

Sorry for my English, I use Google.
So I created a yaml file but I can’t find my counter like this this one wasn’t created

Do you see any errors in the creation of my sensor?

Thank you for your help

- sensor:
  state_class: total_increasing
  source: sensor.water_meter_current_water_consumption
  status: collecting
  last_period: "0"
  last_valid_state: None
  last_reset: "2024-03-31T08:44:55.949862+00:00"
  unit_of_measurement: L
  friendly_name: compteur d'eau garage
  device_class: water

I can’t do it can you help me?

It would be much easier to help you if you would describe, in detail, what your goal is so we can avoid an XY problem.

Things you might want to read based on what you have posted:

Utility Meter Integration