## How to make your dumb IR controlled air conditioner smart in Home Assistant!
Most solutions in making air conditioners smart require a remote control with a screen. This solution does not need that.
#### This is also working in HomeKit!
### What do you need?
To control your air conditioner and get feedback you need a univeral infrared remote control and a smart plug that can measure the power consumption. Do do this I used:
2. Then the IR remote control of your air conditioner must be learned to the remote control. To do this with a broadlink Device, follow the steps from the [Home Assistant Broadlink plugin page](https://www.home-assistant.io/integrations/broadlink/). Create a [remote.send_command script](https://github.com/hxcde/make-dumb-ac-smart/blob/a3aee4818590ab5310621d7640286f65e2a27881/make_dumb_ac_smart#L6) to send the command to the AC.
4. Create a [binary_sensor](https://github.com/hxcde/make-dumb-ac-smart/blob/a3aee4818590ab5310621d7640286f65e2a27881/make_dumb_ac_smart#L28) that detects if the device is on or off based on the energy consumption.
5. Now create a [switch](https://github.com/hxcde/make-dumb-ac-smart/blob/a3aee4818590ab5310621d7640286f65e2a27881/make_dumb_ac_smart#L16) consisting of the [binary_sensor](https://github.com/hxcde/make-dumb-ac-smart/blob/a3aee4818590ab5310621d7640286f65e2a27881/make_dumb_ac_smart#L28) and the [remote.send_command script](https://github.com/hxcde/make-dumb-ac-smart/blob/a3aee4818590ab5310621d7640286f65e2a27881/make_dumb_ac_smart#L6). This can switch the air conditioner, and can detect its state.
6. Last, a [generic_thermostat](https://github.com/hxcde/make-dumb-ac-smart/blob/a3aee4818590ab5310621d7640286f65e2a27881/make_dumb_ac_smart#L38) must be created. To do this, enter the switch entity and the temperature sensor entity in the config. All the settings can be found [here](https://www.home-assistant.io/integrations/generic_thermostat/).
7. To add it to Homekit, just add it to the [homekit config](https://github.com/hxcde/make-dumb-ac-smart/blob/a3aee4818590ab5310621d7640286f65e2a27881/make_dumb_ac_smart#L54).