Tuya Zigbee TRV

This post has some good information on raw messages:

I took on a different tactic and looked for drivers that relate to Tuya specific drivers:

Specifically pilfering from:

This has lead to me using:

def setHeatingSetpoint(preciseDegrees, delay = 0) {
	if (preciseDegrees != null) {
		def degrees = new BigDecimal(preciseDegrees).setScale(1, BigDecimal.ROUND_HALF_UP)

		log.debug "setHeatingSetpoint({$degrees} ${temperatureScale})"
        
        sendEvent(name: "heatingSetpoint", value: degrees, unit: temperatureScale)
    	sendEvent(name: "thermostatSetpoint", value: degrees, unit: temperatureScale)
        
        sendTuyaCommand("0202", "00", "00000000"+zigbee.convertToHexString(preciseDegrees.intValue() * 10, 2))
	}
}

private rand(n) {
	return (new Random().nextInt(n))
}

private getCLUSTER_TUYA() { 0xEF00 }
private getSETDATA() { 0x00 }

private sendTuyaCommand(dp, fn, data) {
	log.info "${zigbee.convertToHexString(rand(256), 2)}=${dp},${fn},${data}"
	zigbee.command(CLUSTER_TUYA, SETDATA, "00" + zigbee.convertToHexString(rand(256), 2) + dp + fn + data)
}

I can now set the setpoint of the TRV from Hubitat. Will play some more when I have time.

The python code you show generates a payload and issues a zigbee command using that data which I suspect can be translated across to hubitat to some extent: