I am unable to save an app file with a custom class definition in it, with the error
Importing [AWSSRP] is not allowed Expression [MethodCallExpression] is not allowed: org.codehaus.groovy.runtime.InvokerHelper.runScript(Script1, args) at line number -1
class AWSSRP {
....
}
def version() {"1.0.0"}
def appVersion() { return version() }
def appName() { return "Schlage Wifi Locks Support" }
definition(
name: "${appName()}",
namespace: "schwark",
author: "Schwark Satyavolu",
description: "This adds support for Schlage Wifi Locks",
category: "Convenience",
iconUrl: "https://play-lh.googleusercontent.com/7IH82e5JiqI2_a9oWndaDyBETXtV45a-QhW_0f-ekADl6W2A3Q0u_vEWQHfQF0D-Flg=w600-h300-pc0xffffff-pd",
iconX2Url: "https://play-lh.googleusercontent.com/7IH82e5JiqI2_a9oWndaDyBETXtV45a-QhW_0f-ekADl6W2A3Q0u_vEWQHfQF0D-Flg=w600-h300-pc0xffffff-pd",
singleInstance: true,
importUrl: "https://raw.githubusercontent.com/schwark/hubitat-schlage/main/schlage.groovy"
)
Can I not put functionality into a class defined in this file? Is there another way to do this?