substituteVariable

Posted on
Sat May 21, 2022 7:18 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

substituteVariable

I am getting this error since upgrade to Indigo 2022.1

type: 'Plugin' object has no attribute 'substituteVariable'


This is a call for variable substitution on the message field, %%v:12345%%

Code: Select all
message =  self.substituteVariable(message)
no longer works


Code: Select all
message = self.substitute(message)
but this seems to work. Is this the right code to use from now on?

Posted on
Sat May 21, 2022 10:13 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: substituteVariable

According to the current docs, substitute() calls substituteVariable() then substituteDeviceState() and I’ve not heard any chatter about this changing or being affected by 2022/Py3 changes.


Sent from my iPhone using Tapatalk Pro

Posted on
Sun May 22, 2022 4:07 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: substituteVariable

This one is a bug I caused when renaming some methods. It'll be fixed in 2022.1.1, but in your case calling subsitute() instead should work fine.

Image

Posted on
Thu May 26, 2022 10:49 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: substituteVariable

Indigo 2022.1.1 is now available, so the substituteVariable and substituteDeviceState APIs should work again.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 13 guests