Is possible manage a sensor as a switch?

Sorry for the stupid question but I’m a beginner.
Following some guides on the web I installed a UPS in HA.
The automatic procedure created several sensor entities.
One of these is:
sensor.ups_studio_beeper_status
which, as it is, is completely useless to me.
It would be more useful for me to have an entity:
switch.ups_studio_beeper
also because the original java program of the UPS allows you to deactivate the buzzer.
It’s possible?

Not with that sensor. It is just showing the state of the switch.

If the integration you used to bring the UPS into Home Assistant does not provide this switch you may be able to make it yourself using a template switch that uses some shell commands for on / off and your sensor for the state.

I didn’t understand much but thanks for your interest anyway