It’s summertime here in Australia, and things are starting to warm up. Today is one of the warmer days so far in the low 30’s (°C), but it is expected to increase as we move towards the end of the month. So that means it’s about time to connect the home’s main air conditioner into the smart home system.

There are two expectations to meet with this integration:

  1. The ability to turn it on and off while away from the house. Mainly as a way to start cooling while on the way home.
  2. Energy costs savings. Should an exterior door be opened, or if no-one is home, then automatically turn off.

A hopeful third idea is an integration into energy monitoring, but that will be for a future article.

Turn air conditioner on/off

As with most of my other smart device integrations, they are done so through Home Assistant and Google Home. But in this particular use case, I will also leverage Google Home’s ability, and requirement, to access the internet. That is because I would like to issue commands while off the home network, with Google Home acting as that bridge.

Using the same Broadlink IR blaster, as seen in part 7, a switch script turns the air conditioner on and off.

- platform: broadlink
  mac: '34:EA:##:##:##:##'
  type: rm_mini
      friendly_name: 'Air Conditioner'

Now while either at home or away, commands are issued through Google Assistant on my mobile phone. This method works the same for other devices and appliances.

OK Google, turn on the air conditioner.

Due to the climate in my region I very rarely use any air conditioners for heating, so for the moment, it will only be used for cooling. To add a heating command, it is as simple as adding in a second switch script.

At a later stage, there is the option to add location-based automation. This automation could also build off work done with understanding the house temperature and comfort levels in part 6.

It would look like this. When entering a specified zone around the house, say 2km, check that no-one else is home, check that the maximum internal temperature has been exceeded, and then turn on the air conditioner. As you can see, many different data points start coming together to form a more complex automation.

Turn off after opening door

Obviously, we don’t want to waste energy unnecessarily. Should an external door to the room/s be opened for an extended period, then the air conditioning should be turned off. The below automation does just that.

The external door to my media room, when opened, activates the automation. But we don’t want the air conditioner turned off immediately in case the person is passing through the door and closing it behind them. So the ‘turn off’ action is delayed for 30 seconds. After this period, another check is performed on the door to see if it is still open. If it is, then turn the air conditioner off.

- action:
  - delay: 00:00:30
  - condition: state
    entity_id: binary_sensor.door_media
    state: 'on'
  - data:
      entity_id: switch.air_conditioner
    service: switch.turn_off
  alias: A/C Media Auto Off
  condition: []
  id: '1511609939491'
  - entity_id: binary_sensor.door_media
    platform: state
    to: 'on'

Not shown in this automation, I’ve been thinking about whether to announce through the Google Home that the air conditioning is turning off due to the open state of the door. This way the occupant would know why this happened. I’m not sure if this would be too much information.

Likewise as in part 7, when there is no-one at home ensure that certain non-essential appliances are automatically turned off. This existing automation has now been updated to include the air conditioner.

Chad is a consultant to the AEC industry, a design technologist, VDC advocate, BIM Manager, early Revit adopter, and public speaker.