Backup and state in an automation

is it possible to backup the state of an entity and then restore at the end of the execution of an automation? The only thing close to this feature i have seen so far is scene create with entity snapshot/turn on, but my zwave entity does not support the restoration (an exception when trying to set the climate “mode” it should not touch but for some reason it got snapshotted alongside the wanted temperature setpoint).

The scene create should have worked. Can you share the script which had the problem?

I’ve also seen devices which don’t play well with a scene of the whole device. As a workaround you could store the setpoint in an input_number and just use that to restore it.

interesting, how can i dynamically backup the current setpoint value into a input_number?

Just make a service call to input_number.set_value with value

value: "{{ state_attr('climate.[whatever id]', 'setpoint') }}"

Assuming the attribute is called setpoint which you will have to check.