Device-Class change not sticking

I have an Everspring ST812 moisture sensor that doesn’t come in with a device type (so just on/off).
I can set the device_class: moisture in the Dev Tools for the binary sensor and for awhile it reflects correctly. Correct icon and wet/dry.
After an unknown period of time or an unknown action it’s back to not having a device_class.
When I first paired it the other day I did set up a mdi:water icon and I am removing that when setting the device_class. I’ve noticed that when it reverts, that icon is back.

Is setting the state in Dev Tools not a persistent change?

No, it is not.

You can change the device class for some entities by clicking on the entity (e.g. go to Devices, pick an entity) and customizing it in its settings:

The other non-UI option is to assign the device class in configuration.yaml.

Thanks. I didn’t feel good about it since it is after all called “Developer Tools” but I wasn’t fully comprehending this page until you confirmed it. I see now that Configuration Variables = configuration file.

Continuing with this, what would be the recommended structure for a change like this if I want to keep it out of configuration.yaml?
Put it in a binary-sensors.yaml file?
You wouldn’t have a sample snippet, would you? Not quite to the point where I am able to make them from scratch and get the formatting correct.