smartHomeHub / SmartIR

Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
MIT License
2.08k stars 1.01k forks source link

.json file for Friedrich Remote Supports Models: AKB73756218, AKB73756215, AKB73756214, AKB73756213, CP05G10A, CP05G10B, CP12G10B, CP15G10A, CP15G30A, CP24G30B, EP08G11A, EP08G11B, EP12G33A, EP12G33B #1297

Open Stromboli94 opened 3 months ago

Stromboli94 commented 3 months ago

73756214.json Attached .json file works with Friedrich remote for models listed. Amazon Listing

Supported Models:

Temperature Range:

Operation modes:

Fan Modes:

Note: sending any of these codes will not turn on the air conditioner. They will only have an effect if the appliance is already turned on. To get around this, I created an ir switch from the broadlink integration to act as a virtual switch with a single on and off command. Put the following into ir_switches.yaml (and be sure the file is included in your configuration):

switch:
  - platform: broadlink
    mac: MAC ADDRESS OF YOUR BROADLINK REMOTE (like aa:bb:cc:dd:ee:ff)
    switches:
      - name: AC Switch
        command_on: JgBAAF8AAT8QNA8SDxIQEg8zEBIREBIQEBEQMxAREBEQEhAzEDQREBIQDzQPEg8TDxIPNA8SEBIPEw8SDzQPEg8ADQU=
        command_off: JgBAAGAAAT8RMhIQDxIPEg81EBIPEhASDzMQMxASEBIPEg8SEBIQERAREBIQERASDxIQMxAREDMQEg8SEBIQMw8ADQU=

Add a climate device (from smart ir integration) as follows:

climate:
  - platform: smartir
    name: My AC
    unique_id: my_ac
    device_code: 73756214
    controller_data: remote.my_universal_remote
    power_sensor: switch.ac_switch (this was created above)

Finally, create an automation to look for changes on the climate device which will turn on the appliance and set the states according to the information on the climate card:

alias: AC Set State
description: Set state of ac when turned on
trigger:
  - platform: state
    entity_id:
      - climate.my_ac
    to: null
condition:
  - condition: template
    value_template: "{{ not (states('climate.my_ac') in ['unavailable','unknown']) }}"
action:
  - if:
      - condition: not
        conditions:
          - condition: state
            entity_id: climate.my_ac
            state: "off"
    then:
      - service: switch.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: switch.ac_switch
      - service: climate.set_fan_mode
        metadata: {}
        data:
          fan_mode: "{{ states.climate.my_ac.attributes.fan_mode }}"
        target:
          entity_id: climate.my_ac
      - if:
          - condition: not
            conditions:
              - condition: state
                entity_id: climate.my_ac
                state: "on"
        then:
          - service: climate.set_temperature
            metadata: {}
            data:
              hvac_mode: "{{ states('climate.my_ac') }}"
              temperature: "{{ states.climate.my_ac.attributes.temperature }}"
            target:
              entity_id: climate.my_ac
        else:
          - service: climate.set_temperature
            metadata: {}
            data:
              hvac_mode: auto
              temperature: "{{ states.climate.my_ac.attributes.temperature }}"
            target:
              entity_id: climate.my_ac
    else:
      - service: switch.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: switch.ac_switch
mode: single

I used broadlink-listener to read the codes from my Broadlink RM Mini 3.