Query about "parent" object used in Groovy scripts

Hi. I am a complete newbie on this forum. Please forgive me if this is a stupid question or has been covered elsewhere but I haven’t found it yet.

What exactly is the parent object in a SmartApp Groovy script? I have seen it used in a few of the SmartApps available, especially the Philips Hue (Connect) app. There are methods on() and off(), but they just seem to call parent.on() and parent.off() methods.

So what is this “parent” object that is used and where does it hook into outside of a .groovy script?

Many thanks in advance.

Have you looked through the documentation?

To create a parent-child relationship, the SmartApp that is to be the parent should use the app input type to specify what app can be a child. The child SmartApp should specify the parent option in its definition to specify what SmartApp should serve as the parent.

http://docs.smartthings.com/en/latest/search.html?q=parent.&check_keywords=yes&area=default

1 Like