Fully automated luxury home climate with Home Assistant

If you’re anything like me, you might have a lot on your mind… which leads you to forget doing trivial things. Like turning off the air conditioner when you leave home, or you open a window.

Do not despair. Here is a sample Home Assistant automation that does it all for you, complete with code. You can modify it as you see fit.

This is how my dashboard looks like when the automation has kicked in. I will soon share how this dashboard is set up.

The tasks the automation makes itself responsible for are very straightforward:

  1. If any one of a set of selected sensors flips to true1, then (depending on the condition, maybe after a few seconds, or maybe immediately) an input_boolean.air_conditioning_suspended is flipped to true.
  2. If all of these sensor conditions flip to false1, then the input_boolean.air_conditioning_suspended is flipped to false.
  3. Whenever the input_boolean.air_conditioning_suspended boolean is flipped to true, the air conditioner is commanded to turn off.
  4. Whenever the input_boolean.air_conditioning_suspended boolean is flipped to false, the air conditioner is commanded to turn on.
  5. If the air conditioner is turned on manually, the boolean is flipped to false — because, obviously, the user’s intention was to run the unit anyway.

Read on to get the code and instructions!

FYI - may be of use to some others - kludgy workaround but it does work - I have the nest lerning thermostat, and have it programmed on a schedule on the top of the hour every hour to reset the temperature settings to what my wife and I agreed upon. Why? sometimes folks will turn it down to 62 degrees when they are hot, or if they are cold just crank it up to 85% just to get it on for the heat etc.

So the schedule resolves that issue. I do have automations that when myt wife and my cell phones are away (and nobody else is in the house (“guest mode”)) it will turn off the HVAC altogether, and then when either of us resturn it will go back on, with the HVAC mode that it had before.

However I discovered while we were away it was going back on sometimes due to the logic mentioned in the beginning above at the top of the hour - so I have a silly automation that if it switches FROM off while we are both away and it is not in guest mode, that it switches back to off. Kludgy but it works…

That behavior (“The A/C unit isn’t cooling enough!”) indicates the A/C thermostat may be working correctly, but the controller for the unit (which interprets the thermostat) is not.

I wrote a post about using a PID controller to resolve that issue.

With this, no one feels the impulse to turn the temperature down — because the A/C just automatically runs harder when it’s warmer outside.

We have forced hot/cold air cooling. Actually it works really well - just that there is with some folks how should I say this… a subconscious effort to crank it way down or way up so it may “blow harder” or get them cooled off or warmed up more quickly - although they know of course it is just on or off - LOL. Hence the agreed upon hourly ‘reset’ (sheesh!)

1 Like

You have stated:

1. If the air conditioner is turned on manually, the boolean is flipped to false — because, obviously, the user’s intention was to run the unit anyway.

What is the best way to go back to “automatic” mode and not staying ON even if windows are open or get open later? After certain time? Immediately after climate is set to off?

My automation makes no provision for that use case.