How to create a virtual entity for managing a device states?

I have an amplifier which I can control via a shell script with the following actions:
on, off, mute, unmute, set volume (percent)

I have no way of polling the state of the amplifier so I’d like to manage states internally within HA.

I looked at the Command Line Switch but can’t see how to add additional actions and track the state of things (e.g. on/off, muted/unmuted, current volume).

Should I keep investigating the Command Line Switch or is there a better approach?

Thanks

Keep the state in an input_boolean (one for on/off, one for muted/unmuted) and the volume in an input_number.

Thanks. I’ll try working through using those.