HowTo: Configure a text based 'state' (or mode) sensor using 'command-line'?

I want to configure a sensor which returns a state (or mode) value (‘Auto’, ‘Low’, ‘Medium’, ‘High’) based on the contents of a file (‘A’, ‘L’, ‘M’, ‘H’). The ‘command-line’ integration seems like it ought to be able to do this (I am already using it extensively for numerical sensors) but I can’t figure out how to configure it, despite reading a lot of documentation :frowning:

Can anyone offer any pointers? Thanks!