I’d like to prevent anyone from turning on room AC/heaters if those doors are left open. I found this answer for a similar request for switches and the answer was to use a switch template, but there doesn’t seem to be a climate template. I could replace the climate card with a button that calls a script but that wouldn’t work for other interfaces like Google Assistant
My last resort is to add an automation triggered by the AC changing to the ‘on’ state to check the door then turn the AC back off if it’s open.
Is the goal to prevent the user from changing the temperature via the UI?
If that’s the goal, put the Climate entity into a Conditional Card and hide it when doors are left open.
If the goal is to prevent a user from changing the temperature via the physical thermostat, you will need an automation to force the target temperature back to the preferred value (i.e. to countermand the user’s actions).
My goal is to prevent the AC from turning on from any interface (lovelace, Google Assistant, zigbee button) if the door is open. The conditional card is interesting, and I may use it to replace the interface with a markdown card stating “AC controls disabled while door is open” or something, but I’d still prefer a global solution which works across all interfaces if that exists.
The only “global” solution is an automation that monitors the target temperature. If it is changed (by any source), the automation confirms all doors are closed. If they are not, the automation sets the target temperature to whatever value you feel it should be.