I have used Blockly to detect a virtual switch going on then set a variable value (tried float and integer) to the current value from a TRV Setpoint and then boost the setpoint to it's max value of 28. This works just fine.
Next I have a second Blockly script that detects the switch going off and tries to update the setpoint of the TRV from the variable I saved before. This doesn't work. I can't use the dedicated setpoint= object as this only takes a value so I used Set Object = Object
You can probably guess, I am testing the "Override" functionality of a thermostat which will eventually switch on a boiler and boost the TRV's for a set period of time before turning off the heating again and bringing the TRV's back to their previous value. Code shows:

Any iea what I can do to make this work?
Thanks
Graham