Substitutions

Plugin writers can enable configuration text fields to accept special markup that will substitute a variable or device state value at runtime. Any string with the following markup will have an Indigo variable value substituted:

%%v:VARID%%

VARID is the unique variable ID as found in the UI in various places.

So, for instance, if one of your actions is to use the Growl plugin to do a notification, in the title and/or description fields you could enter something like this:

Turn on the A/C unit - the outside temperature is %%v:VARID%%.

The value specified would be substituted just before the notification was sent.

Likewise, if you use the following markup:

%%d:DEVID:STATEID%%

The STATEID of the device whose ID is DEVID will be substituted. For instance, an iTunes Server device from the iTunes plugin has a state named album. So, if the ID of your iTunes server device was 123456, then this would insert the album title into the field:

The current album playins is %%d:123456:album%%.

Note - not all text fields will support substitution. The plugin developer must enable it specifically. Check the plugin documentation to see if the field you're interested in supports substitution.

indigo_7.3_documentation/plugins/variable_substitution.txt · Last modified: 2019/01/25 22:53 (external edit)
 

© Perceptive Automation, LLC. · Privacy