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
  host: 10.1.1.103
  mac: '34:EA:##:##:##:##'
  type: rm_mini
  switches:
    media_aircond:
      friendly_name: 'Air Conditioner'
      command_on: 'JgC8AXQ4EAwQKg8NEA0QDQ8NEA0PDRANEA0PDRANEAwQKg8NEA0QDQ8NEA0PDRANECkQKRAqDw0QDRApEA0PDRANEA0PDRANDw0QDRANDw0QDRAMEA0QDQ8NEA0QDBANEA0PDRANEA0PDRANDw0QDRANDw0QDRAMECoPKhANDw0QDQ8NEA0QAAFHdDgQDRApEA0PDRANEAwQDRANDw0QDRANDw0QDRApEA0PDRANEAwQDRANDw0QKg8qECkQDQ8NECoPDRANDw0QDRANDw0QDQ8NEA0QDQ8NEA0QDBAqDw0QDRApECkQKg8NEA0PDRANEA0PDRAqDyoPDRANEA0PDRANDw0QDRANDw0QKRAqDyoQKRApEA0QKRANDyoQKRANDyoQKRANDw4PDRANDg4QDQ8ODg4PDg4ODw4PDg4ODysOKw4rDw4ODg8ODg4PDg8ODg4PDg8NDysPKg8qEA0ODhANDw4ODg8ODg4PDg8ODg4PDg8ODw0QDQ8NDw4PKhANDg4PDg8ODg4PDg4rEA0ODhANDg8ODg8ODg4PDg8ODisPKg8ODg4PDg4ODw4PDg4ODw4ODw4ODyoPDg4PDQANBQAAAAAAAAAAAAAAAA=='
      command_off: 'JgC8AXQ4Dw0QKg8NEA0PDRANEA0PDRANEAwQDRANDw0QKg8NEA0PDRANEA0PDRANECkQKRApEA0QDQ8qEA0PDRANDw0QDRANDw0QDRAMEA0QDQ8NEA0QDQ8NEA0PDRANEA0PDRANDw0QDRANDw0QDRAMEA0QDQ8NECoPKg8NEA0QDQ8NEA0PAAFIdDgQDQ8qEA0PDRANDw0QDRANDw0QDQ8NEA0QDQ8qEAwQDRANDw0QDRANDw0QKRAqDyoQDBANECkQDRANDw0QDQ8NEA0QDQ8NEA0PDRANEA0PDRANDw4PDRApECoPKg8NEA0PDg8NEA0PDRAqDyoPDRANEA0PDQ8ODw4PDQ8ODw0QKg8qDyoQKQ8rDw0PKhANDisPKg8ODyoPKw4ODw4ODg8ODg8ODg8ODg4PDg4PDg4PDg4ODysOKw4rDw4ODg8ODg8ODg8ODg4PDg4PDisOKw8qDw4ODw4ODw4ODg8ODw4ODg8ODg4PDg8ODg4PDg4PDg4QKRANDg8PDQ8ODg4QDQ8qEA0PDRANEA0ODhANDw4PDRANDyoQKRANDw0QDRANDw0QKg8qDyoQKRApEA0QDQ8NEAANBQAAAAAAAAAAAAAAAA=='

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'
  trigger:
  - 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.