How to add to / enhance an Action's description?

Posted on
Fri Nov 08, 2013 1:08 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

How to add to / enhance an Action's description?

I have set-up an Action Group to invoke my Plugin's 'boost' action on my 'thermostat-01' device.

When I select the Action Group in the list on the home window, it just shows the word boost as the description in the list at the bottom of the page.
I would like the description to say 'boost thermostat-01' or ideally 'boost thermostat-01 by 2 degrees C' (where '2' is the delta value for the action).

When looking at the Indigo DB XML, I see that some of the actions have embedded MetaProps that include a description which is displayed in this list at the bottom of the page. The good news is I know it can be done :)

However, I can't find any documentation on exactly how a description can be added to an Action by my Plugin (if this is possible from a Plugin?).

Any pointers / suggestions would be more than welcome, thanks :)

Posted on
Fri Nov 08, 2013 5:29 pm
jay (support) offline
Site Admin
User avatar
Posts: 18261
Joined: Mar 19, 2008
Location: Austin, Texas

Re: How to add to / enhance an Action's description?

In your validateActionConfigUi method, add a "description" key to the valuesDict and it'll use that:

Code: Select all
valuesDict['description'] = "some description of the action configuration"

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Nov 09, 2013 7:19 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: How to add to / enhance an Action's description?

jay (support) wrote:
In your validateActionConfigUi method, add a "description" key to the valuesDict and it'll use that:

Code: Select all
valuesDict['description'] = "some description of the action configuration"


Thanks for this :) - I have got this working where there is a UI involved but I can't see how to achieve this if there isn't a UI involved.

For example I can select to use the Plugin command 'Process Schedule' and then select the device 'Thermostat-01" both of these from pulldowns. A configUi isn't required in this case. The list at the bottom just shows 'process schedule'. I would like it to say 'Process Schedule for Thermostat-01'.

The validateActionConfigUi doesn't get called if there aren't any user entered fields to validate - which I guess seems reasonable. This doesn't appear to give the Plugin the opportunity to look at the action being set-up or amended and hence no opportunity to modify the description.

Can this be achieved in anyway :?:

Posted on
Sat Nov 09, 2013 9:32 am
jay (support) offline
Site Admin
User avatar
Posts: 18261
Joined: Mar 19, 2008
Location: Austin, Texas

Re: How to add to / enhance an Action's description?

Not at the moment - we'd need to change the action dialog code to do this. We'll add it to the request list.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Nov 09, 2013 9:36 am
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: How to add to / enhance an Action's description?

Unfortunately, for actions the Indigo python object model is currently defined completely enough to set it. Once we have that fully defined it will be possible to change it outside of the configUI hook.

Image

Posted on
Sat Nov 09, 2013 9:36 am
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: How to add to / enhance an Action's description?

Darn, Jay beat me by 4 minutes.

Image

Posted on
Sat Nov 09, 2013 10:57 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: How to add to / enhance an Action's description?

Thanks for the replies :D - I look forward to being able to add this in the fullness of time :wink:

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests