Warmup HACS integration - how to change the run mode on a device?

I’m brand new to HA, have just installed the latest version along with HACS, and the Warmup integration.

I have configured the Tado integration, and I can see all my Tado and Warmup devices in the HA dashboard, so far so good!

I want to make an automation, so if my Tado switches to Away mode, then set my Warmup devices to off (or set the Temperature to 10 degrees).

I have this working as follows:
image

Sure enough, if I trigger this automation, I can see in the Developer Tools, States, Attributes, that the run_mode has changed from “prog” to “overide” and the “temperature” is set to 10, as expected.

Now to reverse this, if my Tado switches to Home mode, then I want to set my Warmup devices back into the usual “prog” mode, and somehow cancel the previous override.

I can’t figure out how to do that. Hope someone can point me in the right direction here, HA looks to be very good and full of potential.

Thank you.