Help with Z-Wave Thermostat Driver

I'm modifying an ST driver to support eTRVs - Radiator Thermostats - I have an Aeotech.

def temperatureDown() {
	def nextTemp = device.currentValue("nextHeatingSetpoint").toBigDecimal() - 0.5

In this snippet device.currentValue("nextHeatingSetpoint") always returns null. Same with some of the other values, such as "HeatingSetpoint". alsp tried device.latestState - same result.

What am I missing?


Sorry if this is a silly enough question that you've already considered it, but is there an attribute named nextHeatingSetpoint, and does it have a value? On the device page, you should see it under "Current States" in the upper right (on desktop, or somewhere towards the top on mobile). Additionally, is the custom attribute declared in the driver's metadata, something like: attribute "nextHeatingSetpoint", "number"? If not, the behavior for these "attributes" is not defined, but my experience is that it remains available for use for some time (not sure how long) but disappears from "Current States" upon a manual reload of the device page.

Finally, what hub firmware version are you running? There were some issues on recent versions with custom attributes not seeming to work if they were created on one of the problematic firmware versions (though in my experience they still sort of worked, like the undeclared attributes above). I'm not sure if this was fixed with the update that just came out today or not.

I've been playing around with both nextHeatingSetpoint and heatingSetpoint trying to retrieve a value. Both are displayed correctly up under Current States, I have defined both as attributes.

I'm on a C7 updated to yesterdays latest and greatest, same before the update as afterwards as I had hoped that maybe the update fixed something!!!

Next I'm going to scale this driver back down to a minimal bare-bones driver and compare with another driver that I have for a Danfoss eTRV and see what the difference is - this should work !!!

Here's what eventually worked for me...........

	def temperatureUp() {			
	        def nextTemp = currentDouble("nextHeatingSetpoint") + 0.5d

private currentDouble(attributeName) {
	if(device.currentValue(attributeName)) {
		return device.currentValue(attributeName).doubleValue()
	else {
		return 0d

Many thanks for your assistance.....