[OH2] Read property of a thing in rule

As a workarround I developed a rule function to get the last wakeup time from a zwave device:

val Functions.Function1<String, DateTime> getZwaveLastPacketReceived = [
    String nodeUid |
    	var String url = String::format("http://127.0.0.1:8080/rest/things/%s", nodeUid)
  		var String json = sendHttpGetRequest(url)
		var String lastPacketReceived = transform("JSONPATH", "$.properties.zwave_wakeup_time", json)
		var DateTime dtLastPacketReceived = parse(lastPacketReceived)
		
		return dtLastPacketReceived.withZone(DateTimeZone::getDefault());
]

The function is used like this:

var DateTime lastPacketReceived = getZwaveLastPacketReceived.apply("zwave:device:4c0da5c0:node12")

I’m using this function to set a datetime variable using a cron rule.

@chris: Is this still the only way to access thing properties in a rule or is there now an official api for this?