Guys,
Was just given this solution to a problem on another thread and the namespace won’t import, or it imports and still fails to recognise the object or type.
This is the code:
import org.eclipse.smarthome.model.script.ScriptServiceUtil
import org.eclipse.smarthome.core.thing.ThingUID
tr = ScriptServiceUtil.getInstance.thingRegistry
t = tr.get(new ThingUID("hue:bridge-api2:xxx-xxx-xxx"))
And this is the error:
Script execution of rule with UID 'test-1' failed: The name 'ScriptServiceUtil' cannot be resolved to an item or type.
Any ideas?