Broadlink IR Climate Component

@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.