test for condition: is ESM mode set to ON (Trane tsat)?

What is the luup code to EXIT a scene if ESM mode is on?

I use ESM for extended times away. I have a wall outlet controlling a window unit which comes on every night at a set time. I want to bypass this window unit timer if ESM mode is set to on.

Thanks.

Try this in the Luup tab:

return (luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",<devID>) == "1")

The scene will not run (i.e. the commands won’t be executed) if the t-stat is in ESM.