Specifying action summary text

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
Forum rules
This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
Perry The Cynic
Posts: 857
Joined: Mon Apr 07, 2008 9:46 pm

Specifying action summary text

Post by Perry The Cynic »

When I edit an Action Group in "Show All" view, each action is represented by a single line of text. That's pretty concise, but for plugin actions all it shows is the name of the action - no arguments, and no indication of which plugin this is for. Is there a way for a plugin to specify this description? For example, instead of send text, show send text "IRCODE PAUSE"?

This also applies to editing individual actions, where the space below the "Edit Action Settings..." button just repeats the name of the action, without any disclosure of what those settings currently are.

Cheers
-- perry
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Specifying action summary text

Post by matt (support) »

Try the following:

1) Add a new textfield to your action ConfigUI XML with the id "description" and set hidden attribute to true.

2) Inside your validateActionConfigUi() callback set the "description" property to the caption text you want to display:

Code: Select all

valuesDict[u"description"] = u"send IR command to device foovious"
Note I'm not thrilled about the technique above and I've seen a few cases where the label doesn't get updated/shown. But it is the best approach we currently have, and we use it in some of our plugins.
Image
Perry The Cynic
Posts: 857
Joined: Mon Apr 07, 2008 9:46 pm

Re: Specifying action summary text

Post by Perry The Cynic »

Will do. I'm already abusing the "address" property similarly to show a nice readable address in the device list, so I suppose I shouldn't be squeamish now. :-)

Cheers
-- perry
Locked

Return to “Extending Indigo with Plugins and Python”