Honeywell TH8321WF1001 Mode Setting

I’ve written a simple app to change the mode of my Honeywell TH8321WF1001 when doors are open.
Basically turn the thermostat off when the doors are open and back to auto when closed.
I can set the mode to off, heat or cool but the command

thermostat.setThermostatMode(“auto”) gets ignored.

Has anyone seen this behavior?

Thanks in advance for any replies.

NVM, seems the unit requires “autocool” or “autoheat” not “auto”