Re: Plugin Formulas (aka "field expressions")
Posted: Sat Sep 05, 2015 5:05 am
Hi Korey - here's one way to do it (presumes that the value you're looking for will always follow 'P1VM'). You'll need to figure out how to grab the string in the first place...
or condensed down:
Dave
- Code: Select all
x = 'P1VM-34.5'
start = x.find('P1VM') + 4
vol = x[start:]
indigo.variable.updateValue(123456, vol)
or condensed down:
- Code: Select all
x = 'P1VM-34.5'
indigo.variable.updateValue(123456, x[x.find('P1VM') + 4:])
Dave