Broadlink IR Climate Component

I made a .ini file for Panasonic CS-HE9LKE, but does not allow fan mode (at the end of the file) to work. The codes should be correct. Does something need to be done in broadlink.py to get it right?

    ### Panasonic CS-HE9LKE

    [off]
    off_command = JgC8AXI7DQ8NLA4PDRANDw4PDRANDw0QDQ8ODw0QDQ8NLA4PDRANDw4PDRANDw0QDSwNLA4sDQ8ODw0sDRANDw4PDRANDw0QDQ8ODw0QDQ8NEA0PDg8NEA0PDg8NEA0PDRANDw4PDRANDw0QDQ8ODw0QDQ8NEA0PDiwNLA0QDQ8NEA0PDg8NAAFVcjoPDg0sDg8NEA0PDg8NDw4PDRANDw4PDRANDw0sDg8NEA0PDRANDw4PDRANLA0sDiwNDw0QDSwNEA0PDg8NEA0PDRANDw4PDRANDw0QDQ8ODw0QDQ8NEA0sDRANDw4PDRANDw0QDQ8ODw0sDiwNDw0QDQ8ODw0QDQ8NEA0PDg8NLA4sDSwNEA0PDSwODw0sDg8NEA0sDRANLA0PDg8NEA0PDRANDw4PDRANDw4PDQ8ODw0QDSwNLA4sDQ8NEA0PDg8NEA0PDRANDw4PDSwOLA0sDRANDw0QDQ8ODw0QDQ8NEA0PDg8NEA0PDg8NDw4PDRANLA0QDQ8NEA0PDg8NEA0sDRANDw0QDQ8ODw0QDQ8NEA0PDg8NEA0PDRANDw4PDRANDw0tDQ8NLA4PDRANDw4sDQANBQAAAAAAAAAAAAAAAA==

    [idle]
    idle_command = JgC8AXI7DQ8NLA4PDRANDw4PDRANDw0QDQ8ODw0QDQ8NLA4PDRANDw4PDRANDw0QDSwNLA4sDQ8ODw0sDRANDw4PDRANDw0QDQ8ODw0QDQ8NEA0PDg8NEA0PDg8NEA0PDRANDw4PDRANDw0QDQ8ODw0QDQ8NEA0PDiwNLA0QDQ8NEA0PDg8NAAFVcjoPDg0sDg8NEA0PDg8NDw4PDRANDw4PDRANDw0sDg8NEA0PDRANDw4PDRANLA0sDiwNDw0QDSwNEA0PDg8NEA0PDRANDw4PDRANDw0QDQ8ODw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DRANLA0QDQ8NEA0PDg8NEA0PDQANBQAAAAAAAAAAAAAAAA==
    high = JgC8AXI7Dg4NLA4PDRANDw4PDRANDw0QDQ8ODw0QDQ8NLA4PDRANDw0QDQ8ODw0QDSwNLA4sDQ8NEA0sDRANDw4PDRANDw0QDQ8ODw0QDQ8NEA0PDg8NEA0PDRANDw4PDRANDw0QDQ8ODw0QDQ8NEA0PDg8NEA0PDSwOLA0PDg8NEA0PDRANAAFVcjoODw0sDRANDw4PDRANDw0QDQ8ODw0QDQ8ODw0sDRANDw4PDRANDw0QDQ8OLA0sDSwODw0QDSwNDw4PDRANDw0QDQ8ODw0QDQ8NEA0PDg8NEA0sDRANDw0sDw4NLA4sDQ8ODw0sDSwODw0sDiwNDw4PDRANDw0QDQ8ODw0QDQ8NLA4sDSwNEA0PDiwNLA0sDg8NDw4sDQ8OLA0PDRANEA0PDRANDw0QDQ8ODw0QDQ8NEA0PDiwNLA0sDg8NEA0PDRANDw4PDRANDw0QDSwNLA4sDQ8ODw0QDQ8NEA0PDg8NEA0PDRANDw4PDRANDw0QDQ8OLA0PDg8NEA0PDRANDw4sDQ8NEA0PDg8NEA0PDRANDw4PDRANDw4PDQ8ODw0QDQ8NLQ0PDRANDw4sDQ8ODw0QDQANBQAAAAAAAAAAAAAAAA==

climate.yaml

  - platform: broadlink
    name: Panasonic CS-HE9LKE
    host: xx.xx.xx.xx
    mac: 'xx:xx:xx:xx:xx:xx'
    ircodes_ini: 'broadlink_climate_codes/panasonic_CS-HE9LKE.ini'
    min_temp: 16
    max_temp: 30
    target_temp: 23
    temp_sensor: sensor.aeotec_zw100_multisensor_6_temperature_4
    default_operation: heat
    default_fan_mode: mid
    customize:
      operations:
        - 'off'
        - idle
        - auto
        - heat
        - cool
        - fan
      fan_modes:
        - auto
        - low
        - mediumLow
        - mid
        - mediumHigh
        - high

Error message:

Error executing service <ServiceCall climate.set_fan_mode: entity_id=['climate.panasonic_cshe9lke'], fan_mode=high>
1:03 AM custom_components/climate/broadlink.py (ERROR)
Error executing service <ServiceCall climate.set_fan_mode: entity_id=['climate.panasonic_cshe9lke'], fan_mode=mediumHigh>
1:03 AM custom_components/climate/broadlink.py (ERROR)
Error executing service <ServiceCall climate.set_fan_mode: entity_id=['climate.panasonic_cshe9lke'], fan_mode=mid>
1:03 AM custom_components/climate/broadlink.py (ERROR)
Error executing service <ServiceCall climate.set_fan_mode: entity_id=['climate.panasonic_cshe9lke'], fan_mode=mediumLow>
1:03 AM custom_components/climate/broadlink.py (ERROR)
Error executing service <ServiceCall climate.set_fan_mode: entity_id=['climate.panasonic_cshe9lke'], fan_mode=low>
1:03 AM custom_components/climate/broadlink.py (ERROR)
Error executing service <ServiceCall climate.set_operation_mode: entity_id=['climate.panasonic_cshe9lke'], operation_mode=fan>
1:02 AM custom_components/climate/broadlink.py (ERROR)

This is awesome! I’m a total noob to HA, but I got this working in less than 15 minutes for my RM Mini & Panasonic Aircon, using the panasonic aircon ini file from someone else in the repository!

Thank you so much!!!

I think you need to add x5 of the fan modes all the way through your ini for cool/heat/auto part of the file and i wonder if fan modes at the end needs an ir code for every temperature (even though the ac doesn’t support it i think hassio expects it).

Thank you @kiwijunglist, that solved my problem :+1:

1 Like

I wanted some help with an automation, but I figured out on my own so I’ll post the example here:

- alias: 'Turn off AC if no motion for 90 minutes'
  trigger: # trigger if motion sensor off for 90 minutes
    platform: state
    entity_id: binary_sensor.motion_sensor_158d0001dc7526
    to: 'off'
    for:
      minutes: 90
  condition: # check aircon isn't already idle, if you use the original aircon remote as well as H.A. then you should probably skip this condition, this is because the AC might be set to ON without H.A. knowing it is already on.
  - condition: template
    value_template: "{{ not is_state('climate.panasonic_aircon', 'idle') }}"     
  action: # turn the AC to idle mode
    service: climate.set_operation_mode
    data:
      entity_id: climate.panasonic_aircon
      operation_mode: idle

PS: This is my first automation =)

Can I please request this is added to the wiki page, I’m sure it would help a lot of people.

@bengt you’re welcome

2 Likes

I had an idea to improve the functionality of my air conditioner with the broadlink component. Sometimes you don’t know if the aircon is on (ie if it was turned on via the original IR remote).

You can put a xiaomi door sensor on the duct of the air conditioner. It can sense whether the airconditioner is on or off. Is there any way this can be easily integrated into the existing climate control. I was wondering if we could add an additional state called “on” that doesn’t have an IR code.

The logic would be

If xiaomi door sensor from closed to open , then check broadlink cimate aircon state. If currently idle then set state to “on” if not idle then do nothing.
If xiaomi door sensor from open to closed, then check broadlink climate airconst ate. If currently not idle then set state to idle.

Is there a way to set the climate aircon state through automation.yaml ?

6 Likes

That’s a great idea, I will probably do something like that. I even have an extra wireless door sensor. I think you could set the state through automation, but what temperature would you set it at? As you know, the AC can not report back to the Braodlink unit what temperature it is set at. Maybe use the target temp defined in the YAML config file but what could be set using the AC remote control could be different…

Yes. You only know that it is on. You don’t know operation mode, target temp, or fan speed.

I’d set it as
Operation mode: on
Temp:
Fan speed:

For temp i think I’d leave it blank, you could use “unknown” for temp, or just leave it at the current numerical value. I don’t think it’s that important to know the target temp, just the fact that it is on should be enough for most automations.

I found you can set the state and attributes of the climate entity in the states tab of the web interface using a web api call with a json string. I have not idea how to put that action into automation.yaml though.

I have asked the question here:

But haven’t had any replies yet.

using open close sensor to detect the state (on/off) of a dumb aircon is a brilliant idea. unfortunately it is not supported by this custom component. i hope this can be supported soon. perhaps it can do something similar to Switch Template where it uses value_template to determine the state of the switch.

You can actually change the state using an api call so it is “supported”, in a way.

Mind to share how to do that?

It’s in the link about 4 posts above. I can change it with the web gui , but haven’t figured out how to write that into an api call in an automation yet. (I’m waiting for an expert to help).

I’m no expert, but I will install the open/close sensor soon and try to figure it out… Even if it’s not integrated into the custom component, it is still useful to have separately.

I got started on this the command is gonna be something like this:

(I shortened the attributes list to make the example code smaller).

Configuration.yaml

rest_command:
  set_climate_state_idle:
    method: POST
    url: 'https://xxxxxx.duckdns.org:8123/api/states/climate.panasonic_aircon'
    password: 'xxxxxx'
    content_type: application/json
    payload: '{
    "state": "idle",
    "attributes": {
        "fan_mode": "auto",
        "operation_mode": "idle"
        }
    }'

Automation.yaml

- alias: set climate state to idle when aircon turns off
  trigger:
    - platform: state
      entity_id: binary_sensor.door_window_sensor_158d0001f38b1f
      from: 'on'
      to: 'off'
  condition:
    - condition: template
      value_template: "{{ not is_state('climate.panasonic_aircon', 'idle') }}"     
  action:
    - service: rest_command.set_climate_state_idle

unfortunately there are some syntax errors in the rest_command, and I haven’t figured it out.

@masterkenobi - you can use this as it works.

OK i managed to use the door sensor to ‘update’ the broadlink climate control. I had to make an extra mode called ‘on’ in the configuration.yaml and the panasonic_ir_code.ini. The ini file for the IR codes had to have a lot of dummy entries for the new operation mode. Note this setup uses ‘off’ rather than ‘idle’.

This is obviously not the ideal way to do this, so if anyone can figure out how to update the climate entity state and attributes without actually calling the climate service, then this would be ideal (see above post, on how far i got trying to figure it out). If you can use the restful api call then you don’t have to add the dummy codes to the ini file. I tried to get some help here as well - Help with home assistant api call

What it does:

  1. If your airconditioner is turned on using the original remote (regardless of whether it is cool or hot or fan mode), then the climate control will change to ‘on’.
  2. If your airconditioner is turned to off using the original remote, then the climate control will change to ‘off’

Configration.yaml

climate:
  - platform: broadlink
    name: Panasonic Aircon
    host: 192.168.178.81
    mac: '34:EA:34:58:AA:65'
    ircodes_ini: 'broadlink_media_codes/panasonic_CS-RE_GKE.ini'
    min_temp: 16
    max_temp: 30
    target_temp: 20
    temp_sensor: sensor.temperature_158d0001f52edb
    default_operation: idle
    default_fan_mode: mid
    customize:
      operations:
        - 'off'
        - cool
        - heat
        - 'on'
      fan_modes:
        - low
        - mid
        - high
        - auto 

Automation.yaml

- alias: 'Update AC to off if turned off on the remote control'
  trigger:
    - platform: state
      entity_id: binary_sensor.door_window_sensor_158d0001fd55d5
      from: 'on'
      to: 'off'
      for:
        seconds: 1
  condition:
    - condition: template
      value_template: "{{ not is_state('climate.panasonic_aircon', 'off') }}"     
  action:
    service: climate.set_operation_mode
    entity_id: climate.panasonic_aircon
    data:
      operation_mode: 'off'
      
- alias: 'Update AC to on if turned on with the remote control'
  trigger:
    - platform: state
      entity_id: binary_sensor.door_window_sensor_158d0001fd55d5
      from: 'off'
      to: 'on'
      for:
        seconds: 1
  condition:
    - condition: template
      value_template: "{{ is_state('climate.panasonic_aircon', 'off') }}"     
  action:
    service: climate.set_operation_mode
    entity_id: climate.panasonic_aircon
    data:
      operation_mode: 'on'

panasonic_ircodes.ini with dummy entries : https://pastebin.com/fL5jNULw
the hack wont work unless you add the dummy entries, otherwise you can’t set it to ‘on’ mode.

hi, can you share the .ini file of the haier air conditioner? thank you so much

hello, explain to me the steps to have all this on hass.io? thank you

@Vassilis,
Is there any way to get current state/status of devices attached to broadlink?
Please guide if theres any way,
Thanks in adv.

No, there is no way. If you read it, this thread above suggested to attach a wireless door/window sensor to the AC unit to know when it’s off or on. But temperature, there is no way.