Broadlink IR Climate Component


#410

You can manually grab the IR codes for your systems “Fan” mode and then create the “Fan” section in the INI file for it.

I did that with my Hitachi unit for the various modes that were not included in the “default” hitachi.ini file

I think you should be able to do it as an additional “platform” for the Fan Only modes with a separate ini file for fan only modes.


#411

The solution you provided will not make me able to change the speed of the a/c during it’s cooling phase if I understood it right.
What I did instead is created a fan template and link it to the climate device’s fan speeds. (I can provide the code if anyone is interested). The problem then changes to the way homekit and also google assistant fan devices’ exposing.
Both homekit and google assistant components of homeassistant exposes the fans as switches. So you can not change the speed. If any improvements could be done, it should in those two components. Hopefully someone will address this. Fingers crossed.


#412

@Vassilis
Where can I report a possible bug?

I am using a line to push a sensor notification to me via the notify command and it is showing the notify script in my Climate card on the home screen.

IE: I use this code to send me a notification in an automation.

  action:
  - service: notify.push_notify
    data:
      message: > 
        "Temperature has reached {{ states("sensor.int_temp") }} setting. "

The unexpected, and unwanted, result is this on the Climate card:

Air-conditioner {{ states(“sensor.int_temp”) }} 24 C. It should be showing either Heat, Cool of Off, but instead it shows " {{ states(“sensor.int_temp”) }} ".

The {{ states(“sensor.int_temp”) }} is being pulled from the automation.yaml file for some reason, despite the above code being the documented way of sending sensor data in a notification.


#413

Guys, how do I configure this component if:

  • In dry mode I have only one option: auto (no temperature, no fan control)

    Traceback (most recent call last):
    File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py”, line 226, in _handle_service_platform_call
    await func(entity, data)
    File “/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/init.py”, line 679, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
    File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
    result = self.fn(*self.args, **self.kwargs)
    File “/config/custom_components/climate/broadlink.py”, line 283, in set_temperature
    self.send_ir()
    File “/config/custom_components/climate/broadlink.py”, line 167, in send_ir
    command = self._commands_ini.get(section, value)
    File “/usr/local/lib/python3.6/configparser.py”, line 792, in get
    raise NoOptionError(option, section)
    configparser.NoOptionError: No option ‘mid_31’ in section: ‘dry’

One workaround is in my mind: use same (auto) command for all variations mid_31 =, mid_30,…low_30 = etc.

  • Same for FAN mode, I have only low/mid/high settings, no temperature -> edit: this mode is not supported in ir climate component

  • Blade position mode is not supported?


#414

Does your AC allow to set the temperature for dry mode? Usually setting temperature means you want it as a target temperature so AC would need to either heat or cool the air. In my system ‘dry’ means just that: reduce humidity without changing temperature, so the temperature setting is irrelevant.

As for the blade position it is not supported directly since would require to maintain a large set of IR commands. One possible workaround if you really need to vary this setting is to define several separate AC units in HA, each with a differently set blade position. They will control the same physical unit but blade position will be different. Probably not the best solution but I cannot think of anything else.


#415

Does your AC allow to set the temperature for dry mode?

No, it’s fully automatic, because as you wrote it’s for “reduce humidity without changing temperature, so the temperature setting is irrelevant.”

You are right and blade position is not very important. Currently I have ca. 150 commands, in case of blade position this number is multiplied by 4.

One thing should by important and that’s FAN mode it’s missing completely from the ir climate component. Sure, there is separate FAN component, but it requires separate device and it’s status is not synced (I turn on AC cooling, I change to FAN mode, I turn off device with FAN component and AC is still on.)


#416

Sorry, it looks like I did not understand you correctly. I interpreted your first sentence as if you had this setting on the real AC and it was missing from IR climate component :smile:

I personally prefer swinging blade so it is the only setting I use. It would take significant time to make Broadlink learn all the commands if you have around 600 :grin:


#417

Thanks @callifo
I have got the chance to check this out earlier, but I am trying it out.

One question, the sample code your provided works with one boradlink device. how can I make that generic since I have multiple broadlink around the house and the command for the A/C is the same across all. I do not want to create a switch for each room as this does not make sense.

Thank in advance.


#418

Depends on how you want to enact sending the command to each unit.

First thing that comes to mind would be an input_select that chooses which room you are in.

input_select:
 aircon_select:
    name: Airconditioner List
    options:
      - Master Bedroom
      - Bedroom 2
      - Bedroom 3

Then in the script, use this to select which broadlink:

script:
broadlink_aircon_on:
  sequence:
    - service_template: >
        {%- if (is_state('input_select.aircon_select', 'Master Bedroom')) -%}
          switch.broadlink_send_packet_192_168_10_1
        {%- elif (is_state('input_select.aircon_select', 'Bedroom 2')) -%}
          switch.broadlink_send_packet_192_168_10_2
        {%- elif (is_state('input_select.aircon_select', 'Bedroom 3')) -%}
          switch.broadlink_send_packet_192_168_10_3
        {%- else -%}
          script.do_nothing
        {%- endif %}
      data:
        packet:
          - "sgAwAQ0bDRwNGw4bDRsOGw0bGg4bDRsODRsNHBkOGw0OGxoOGg4NHA0AAXoNDQ0ODQ0NDQ4NDoYbDRsODBwaDhoOGg4aDhoODRwaDhoOGg4aDg0bGw0NHA0cDRsNHA0bDRsOGw0bDhsNGxoOGw0bDQ4bDhsaDRsODRsaDhsNDhsNAAF6DQ0ODA4NDgwODQ6GGw0bDQ4bGg4bDRoOGw0aDg4aGw4aDhsNGg4NHBoNDhsNGw4bDhoOGw4aDhsOGg4bDhobDhoOGwwOGw4aGw4aDQ8aGw0bDQ4bDgABeQ4MDg0ODA4NDgwPhRsOGwwPGhsNGw0bDRsNGw0PGhsNGw0bDRsNDhsbDQ4aDxoOGg8aDhoPGg4aDxoOGg8aGw0bDRsNDhoPGhsNGw0OGxsNGw0OGw4ABdwAAAAAAAAAAA=="
That would then send the same packet to different broadlinks depending on your dropdown.

#419

This worked perfectly.
Now time to improve on this and have arrows linked to the script and group the script with the drop down.
@callifo :+1:


#420

Hey guys… I am trying to get a ON mode for fujitsu AC so that I can say to google “Turn on the AC” . I can say “Turn off the AC” and it works

I currently say “Set AC to auto”.

My config is

climate:
  - platform: broadlink
    name: AC
    host: XXXXX
    mac: 'XXXXXX'
    ircodes_ini: 'custom_components/broadlink_climate_codes/fujitsu.ini'
    min_temp: 16
    max_temp: 29
    target_temp: 20
    temp_sensor: sensor.temperature_158d0001fa985e
    default_operation: 'off'
    default_fan_mode: low
    customize:
      operations:
        - 'off'
        - heat
        - dry
        - fan
        - auto
      fan_modes:
        - auto
        - high
        - med
        - low
        - quiet

Is it matter of adding “- on” to the modes and then faking a line in the fujitsu.ini

[on]
on_command = JgAEAWQyDAwMDAwlDAwMJQwMDAwMDAwlDCUMDAwMDAwMJQwlDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMJQwMDAwMDAwMDAwMDAwMDCUMDAwMDAwMDAwlDCUMJQwlDCUMJQwlDCUMDAwMDCUMDAwMDAwMDAwMDAwMDAwMDCUMJQwMDAwMJQwMDAwMDAwMDAwMDAwlDCUMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDCUMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDCUMDAwMDAwMJQwlDCUMJQwMDAwMDAwADGgNBQ==

The above command is from the “auto_22” which I am guessing when turned on will set a 22C automatic mode which is the default we want


#421

I’m not sure it works that way. Rather than on, you need to say what mode you want it to turn on to.

“Turn on the heater” or “Turn on the Cooler” or “Turn on the heater to 26 degrees”. Not sure that “Turn on the Auto” will work lol.


#422

HI All, I have a few mini’s and a pro, pro works great but I can’t get the mini to work with this component. I have triple checked the set up and its just fine. Is there any logs I can see to check what is being sent out?


#423

This component is awesome! I have an A/C in my bedroom and works perfect with my RM Mini.

However in my main living area I have a harmony hub and have some scripts and input_selections to trigger my A/C in that room.

I’m sure it would be possible to create a custom component similar to this, using the harmony hub as a climate device. It doesn’t look like anyone has created this? I’m willing to give it a try, haven’t coded in python before but always wanted to try a little project.

@Vassilis do you mind if I fork this?


#424

I have a pro and two rm minis. They all work as expected. Maybe it would be a good idea to share your config and ask here.


#425

I am having an issue where Google Assistant constantly says “That mode isn’t available for the air-conditioned” if I give any command.
Even a simple one like " Hey Google, turn on the cooling at 26 degrees"
My ZXT-120 will be changed with Google, but the Broadlink Climate component isn’t.


#426

Try turning it on first to cool, then setting the temperature.


#427

Hi @Vassilis.
Firstly thanks for the development of this. I was using it successfully with a Dakin split system. I have now replaced that with a Panasonic unit that is able to be controlled via json POST requests. I was wondering if you would be able to help me strip your component down to a generic python code that responds to the “Climate” component controls?


#428

@talondnb
That allows temperature changing via Google Assistant, but it still doesn’t let me say “Hey Google, turn on the Air-Conditioner” If I am watching TV and do not have the Web Interface for HASS open :slight_smile:

What I wanted to know, is there a way to get it to recognise the on / off / cool / heat mode commands, not just the temperature.
Thanks.


#429

Yes, that should already work. I’ve just tested ‘Hey Google, turn on the heater in the living room to 25’ and this worked fine.