I have not seen any method to retain a variable (Such as setpoint) if there is a power cycle.
Am I missing something?
Thanks I will take a detailed look at, after doing some reading it does indeed sound like it sound work.
Also consider using retained topics in mqtt.
If you want to learn more about MQTT then see this tutorial MQTT Essentials - All Core Concepts explained