I have a plugin with device states "SRC1", "SRC2", "SRC3" etc. My device itself uses these values to address it so it is helpful not to change the values. I would like to have a control page that displays text based on the value, so for example, to display "Squeezebox" if state is SRC1 and "CD" if SRC2. I can display the state but I do not know how to insert logic to control different variable text. On idea I have is to set up a variable that has the identity of the state. I know how to set the variable value with the state, but how can I use python to update (say if state =="SRC1" then variable="Squeezebox). Probably easy but I am striking out trying.
Also, is there an easy way to call a function within my plugin from the control page without having an action for it. For example, my plugin has this line: self.commQueue.append(dev.pluginProps["zoneselect"] + "FWD")
How could I run this from the control page?