Use /var instead of /set, it'll make the variables local and you won't need to unset them.
Also,
did -r temperature 2 | did -a temperature 2 %temp
You can combine switches. So you can do:
did -ra temperature 2 %temp