Broadlink IR Climate Component

Just posting to say thanks @Vassilis great work with this, very easy to setup and works really well.

Ditto, probably my most used function in HA. With Google Home integration, it gets used multiple times a day.

What commands do you say to Google Home to set the device? I cant figure out what to say to make it work!

You need to publish the HA to Google via the API set out in this guide https://www.home-assistant.io/components/google_assistant/

You need proper certificates as per this guide: https://www.home-assistant.io/blog/2017/09/27/effortless-encryption-with-lets-encrypt-and-duckdns/

Once thatā€™s done, you can say
Hey Google, ā€¦turn the air conditioner to cool
ā€¦set the air conditioner to 22 degrees
ā€¦what is the indoor temperature
ā€¦what temperature is the air-conditioner set to
etc

With Google Assistant setup you can expose a lot of stuff to it. I can say turn off the TV and it will use the Broad link unit to send an IR command to turn off the TV. You can run scripts to.

In case anyone is interested, here is the Trane ini, works with a minisplit and a split fan and coil system. https://pastebin.com/jbpdRmne

Thanks, how would I go about setting the trigger to be the target temperature? This is a description of what Iā€™m trying to accomplish.

RM Pro broadcasts IR codes, Canary camera system has a temperature sensor. When my rooms temperature (read from the Canary sensor) reaches the target temperature set on the RM Pro, turn AC off. If room temperature strays by Ā± 2 degrees Celsius, turn on last state for the AC.

Basically I want to make it work like a Nest or Ecobee, although I donā€™t know if thatā€™s possible.

Does your aircon not have the ability to know what the target temperature is in your target room?

The automation could get quite tricky bc if you turn off the aircon manually the script will keep turning it back on unless you have a separate button to toggle the script off as well. Also the script will be fighting with the aircon because the aircon will have its own thermometer and will be trying to achieve the temp set on its own thermometer, so really your script should set the ac to the extreme settings (ie heat, 32 degrees or cool, 18 degrees), rather than the last state.

@Madelinot

Have you integrated a door sensor into your aircon set up yet? If so just wondering if you are updating the climate state using the sensor and if you are, are you using my method of a dummy ā€˜onā€™ state with dummy ir codes or a different method.

@kiwijunglist

Does your aircon not have the ability to know what the target temperature is in your target room?

It does but itā€™s a variable speed system, so once it hits the target temperature it doesnā€™t turn off, just slows the fan down to low. My A/C guy tells me this is more efficient than turning it off (which I havenā€™t managed to wrap my head around) but I am freezing to death if I leave it on all night.

The automation could get quite tricky bc if you turn off the aircon manually the script will keep turning it back on unless you have a separate button to toggle the script off as well. Also the script will be fighting with the aircon because the aircon will have its own thermometer and will be trying to achieve the temp set on its own thermometer, so really your script should set the ac to the extreme settings (ie heat, 32 degrees or cool, 18 degrees), rather than the last state.

Thatā€™s what I though, Iā€™m going to give it a try but I also just found CoolRemote, if I canā€™t make it work I will probably give that a try and see if I can actually integrate a Nest.

Yes. The guy is right. If you want to keep the room at the desired temp then you want to leave it on. Itā€™s bad to have it constantly turning on and off. Your automation is definitely do able but itā€™s a bad idea. The air con will be more efficient if you leave it on vs turning it on and off every 10 minutes.

Thanks @callifo, much appreciated. I have Google Assistant set up and have the AC climate component exposed to GA. All other devices work as they should and respond to commands through GA. When I say a few commands it says mode not available or something similar. Will keep trying different phrases to see what works!

Its very specific on wording. Turn on the the airconditioner to cool doesnt work. Turn the airconditioner to cool, or turn the airconditioner to fan, etc.

The exposed climate component is as follows:

entity_config:
climate.airconditioner:
name: House Air Conditioner
expose: true
aliases:
- House Air Conditioner

ā€˜House Airconditionerā€™ didnt work. I can however say just ā€˜Air conditionerā€™, not having to say the whole ā€˜House Air Conditionerā€™

ā€˜House Air Conditionerā€™ shows up in the Home application with a temperature probe next to it.

My entity is named ā€˜Living Room ACā€™ and Iā€™ve managed to switch to heater mode but saying ā€˜set the living room ac to heatingā€™ - funny that saying ā€˜set the living room ac to heatā€™ doesnā€™t work. Also, simply saying ā€˜turn on/off the heaterā€™ also works.

Yeah thats what I figured, thanks!

Another issue I found was ā€˜offā€™ had to match in your IR code ini file.

Mine used to have [idle] as the off mode, and GH would not accept Turn off the Air Conditionerā€¦ or Turn the Air conditioner to idle. I had to change the ini file to [off] and change the default mode / mode to ā€˜offā€™ to get it to work.

@kiwijunglist

I have not installed the sensor yet. I will in the next few weeks. This is installed at my condo, which is located in another city, 4 hours away; I only go every 2-3 weeks.

I got it working (change aircon state to ā€˜onā€™ without communicating directly with the climate control)

Configuration.yaml

climate:
  - platform: broadlink
    name: Panasonic Aircon
    host: xxxxxxxxxxxxxxxx
    mac: 'xxxxxxxxxxxxxxxxxxxxx'
    ircodes_ini: 'broadlink_media_codes/panasonic.ini'
    min_temp: 16
    max_temp: 30
    target_temp: 20
    temp_sensor: sensor.temperature_158d0001f52edb
    default_operation: 'off'
    default_fan_mode: mid
    customize:
      operations:
        - 'off'
        - cool
        - heat
      fan_modes:
        - low
        - mid
        - high
        - auto 

sensor:
  - platform: template
    sensors:
      climate_temperature:
        value_template: "{{ states.climate.panasonic_aircon.attributes['temperature'] }}"
      climate_fan_mode:
        value_template: "{{ states.climate.panasonic_aircon.attributes['fan_mode'] }}"

rest_command:
  set_climate_to_on:
    method: POST
    url: 'https://xxxxxxxxxxxxx.duckdns.org:8123/api/states/climate.panasonic_aircon'
    headers:
      content-type: application/json
      password: xxxxxxxxxxxx
    payload: '{"state": "on", "attributes": {"current_temperature": {{ states.sensor.temperature_158d0001f52edb.state }}, "min_temp": 16, "max_temp": 30, "temperature": {{ states.sensor.climate_temperature.state }}, "target_temp_step": 1, "fan_mode": "{{ states.sensor.climate_fan_mode.state }}", "fan_list": ["low", "mid", "high", "auto"], "operation_mode": "on", "operation_list": ["off", "cool", "heat"], "unit_of_measurement": "Ā°C", "friendly_name": "Heat Pump", "supported_features": 193}}'

Automation.yaml

- alias: "Set AC to ON"
  trigger:
  action:
    - service: rest_command.set_climate_to_on

PS: I have to store the climate controls target temperature and climate controls fan mode in a sensor as I canā€™t use states.climate.panasonic_aircon.attributes[ā€˜temperatureā€™] in the payload because it has ā€™ and " symbols already.

1 Like

Dear,
I m unable to get current temperature,
Please guide,
Using Ogeneral AC

What are you using to get the temperature? Iā€™m not aware of being able to retrieve it from the Broadlink unit.

Mine comes from a temperature sensor plugged into the RPi.

Ok dear, i got it,
we need extra device /temperature providing device.
Thanks