I have been able to integrate my AC Split System into HA using a Harmony Hub and IR commands.
This took a while to setup but I am now able to perform many different air conditioner actions via Home Assistant in an intuitive fashion.
The end result allows me to control the Operating Mode (COOL / FAN / OFF), the Fan Mode (AUTO / LOW / MED / HIGH), the Swing Mode (SWING or TOP) and the Target Temperature (18 - 22).
I started by making a generic Air Conditioner device within Harmony and teaching a Power On and Power Off command via the AC Remote Control. As these remotes send all the setting whenvever a change is made I then taught a list of IR Commands to the device for temperatures and settings which I would generally use. I came up with the convention of TEMPERATURE-FANMODE-SWINGMODE. After this I created a long list of all the separate commands which would be required (examples below).
Once the list was created I started to manually teach each individual command to the Harmony Hub - this was quickest (although still slooooowww) via the PC application rather than the mobile app. In order for the remote to send the correct command it had to be turned off with the correct setting and then turned back on whilst the Harmony Hub was ready to learn the command.
Once all the IR commands had been setup I needed to integrate the device into Home Assistant.
Once it was integrated and the ‘harmony_harmony_hub.conf’ file was populated with the IR commands, I setup the required configurations. I won’t dig into the configurations far but basically I use a Template Sensor to format the Input_Select and Input_Slider data and then Automations to send the commands to the Harmony Hub whenever the inputs are updated.
input_select:
ac_operation_mode:
name: Operating Mode
options:
- COOL
- FAN
- Power Off
initial: Power Off
icon: mdi:settings
ac_fan_mode:
name: Fan Mode
options:
- AUTO
- LOW
- MED
- HIGH
initial: AUTO
icon: mdi:fan
ac_swing_mode:
name: Swing Mode
options:
- TOP
- SWING
icon: mdi:arrow-expand
input_slider:
ac_target_temp:
name: Set Target Temp
min: 18
max: 22
step: 1
initial: 21
sensor:
- platform: template
sensors:
ac_setting_cool:
friendly_name: 'Current AC Cool Setting'
value_template: '{{ states.input_slider.ac_target_temp.state | int }}-{{ states.input_select.ac_fan_mode.state }}-{{ states.input_select.ac_swing_mode.state }}'
ac_setting_fan:
friendly_name: 'Current AC Fan Setting'
value_template: 'FAN-{{ states.input_select.ac_fan_mode.state }}-{{ states.input_select.ac_swing_mode.state }}'
ac_target:
friendly_name: 'Target Temperature'
value_template: '{{ states.input_slider.ac_target_temp.state | int }}'
unit_of_measurement: '°C'
automations:
# Start Air Conditioner - Cool
- id: ac_start_cool
alias: AC Start Cool
hide_entity: True
trigger:
- platform: state
entity_id: input_select.ac_operation_mode
- platform: state
entity_id: input_select.ac_fan_mode
- platform: state
entity_id: input_select.ac_swing_mode
- platform: state
entity_id: input_slider.ac_target_temp
condition:
- condition: state
entity_id: input_select.ac_operation_mode
state: 'COOL'
action:
- service: remote.send_command
entity_id: remote.living_room
data_template:
device: "44392204"
command: "{{ states.sensor.ac_setting_cool.state }}"
# Start Air Conditioner - Fan
- id: ac_start_fan
alias: AC Start Fan
hide_entity: True
trigger:
- platform: state
entity_id: input_select.ac_operation_mode
- platform: state
entity_id: input_select.ac_fan_mode
- platform: state
entity_id: input_select.ac_swing_mode
condition:
- condition: state
entity_id: input_select.ac_operation_mode
state: 'FAN'
action:
- service: remote.send_command
entity_id: remote.living_room
data_template:
device: "44392204"
command: "{{ states.sensor.ac_setting_fan.state }}"
# Stop Air Conditioner
- id: ac_stop
alias: AC Stop
hide_entity: True
trigger:
- platform: state
entity_id: input_select.ac_operation_mode
to: 'Power Off'
action:
- service: remote.send_command
entity_id: remote.living_room
data_template:
device: "44392204"
command: "PowerOff"
group:
airconditioner:
name: AC Split System
entities:
- input_select.ac_operation_mode
- input_select.ac_fan_mode
- input_select.ac_swing_mode
- input_slider.ac_target_temp
- sensor.ac_target
- sensor.fibaro_system_fgms001zw5_motion_sensor_temperature
So far this has proven work reliably for me and was worth the effort! Let me know if there are any questions, you can also checkout my current setup at my GitHub repository.
Great share! I was looking into reverse engineering an AC remote through decoding IR codes. Tedious and can be frustrating but this approach seems to be intuitive and simple enough not to pull out some hairs on the head. I did not know you can teach harmony hub to learn ir codes? I was thinking of getting a harmony hub for my Google Home+set top box+changing TV input through IFTTT (google home is still not officially available here in Australia). Thanks again for sharing!
Thanks @charlesdalid, it’s good to see someone getting something out of it
It did take a while to get all the codes in but I just had the TV on in the background so it wasn’t too tedious!
I’m also from Australia and have a Google Home, still haven’t played around with the Harmony integration that much as of yet although I am planning to at some stage with shortcuts.
Hey @LaFed ,
Sorry I don’t have a Broadlink RM Pro but it shouldn’t have any problems being used in a similar way although it may take a while to setup the IR Commands. Based on the Broadlink documentation you should be able to learn the IR Packet for each AC command, add each command as a switch within the Broadlink platform and then call the Broadlink switch command within the action stage of the automation.
I believe your Broadlink Switch configuration should look something like…
I know this is late, but I have actually just finished configuring my RF Ceiling Fan to be controlled by a Broadlink RM Pro in a similar way. The package file is linked below, basically it uses the switch.turn_on service against the appropriate Broadlink switch.
Hi all, I ended up creating a custom climate component for AC Integration via Harmony. The benefit of this, is it appears as a climate device in home assistant so you can use the built in way of controlling climate devices or even the lovelace thermostat card.