Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Mitsubishi Electric MSZ-WR24NA, MSZ-HM18NA-U1, MSZ-… #125

Merged
merged 8 commits into from
Sep 22, 2024

Conversation

Stromboli94
Copy link

@Stromboli94 Stromboli94 commented Sep 4, 2024

Create files:

  • 613.json 1142.json
  • 73756214.json 3400.json
  • 810900349.json 3500.json

UPDATE: Due to support of dedicated "on" command, the below procedure is no longer required

Note for Friedrich devices: sending any of the codes in 73756214 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=

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:
      - metadata: {}
        data: {}
        target:
          entity_id: switch.ac_switch
        action: switch.turn_on
      - metadata: {}
        data:
          fan_mode: "{{ states.climate.my_ac.attributes.fan_mode }}"
        target:
          entity_id: climate.my_ac
        action: climate.set_fan_mode
      - if:
          - condition: not
            conditions:
              - condition: state
                entity_id: climate.my_ac
                state: "on"
        then:
          - metadata: {}
            data:
              hvac_mode: "{{ states('climate.my_ac') }}"
              temperature: "{{ states.climate.my_ac.attributes.temperature }}"
            target:
              entity_id: climate.my_ac
            action: climate.set_temperature
        else:
          - metadata: {}
            data:
              hvac_mode: auto
              temperature: "{{ states.climate.my_ac.attributes.temperature }}"
            target:
              entity_id: climate.my_ac
            action: climate.set_temperature
    else:
      - metadata: {}
        data: {}
        target:
          entity_id: switch.ac_switch
        action: switch.turn_off
mode: single

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

…HM24NA-U1, MSZ-WR24NA-U1, MUZ-HM18NA, MUZ-HM24NA, NTXWMT18A112AA, NTXWMT24A112AA, NTXSMT18A112AB, NTXSMT24A112AA

add climate code file 613.json to support Mitsubishi Electric MSZ-WR24NA, MSZ-HM18NA-U1, MSZ-HM24NA-U1, MSZ-WR24NA-U1, MUZ-HM18NA, MUZ-HM24NA, NTXWMT18A112AA, NTXWMT24A112AA, NTXSMT18A112AB, NTXSMT24A112AA
…B73756213, CP05G10A, CP05G10B, CP12G10B, CP15G10A, CP15G30A, CP24G30B, EP08G11A, EP08G11B, EP12G33A, EP12G33B

create 73756214.json to support Friedrich AKB73756218, AKB73756215, AKB73756214, AKB73756213, CP05G10A, CP05G10B, CP12G10B, CP15G10A, CP15G30A, CP24G30B, EP08G11A, EP08G11B, EP12G33A, EP12G33B
create 810900349.json to support Black + Decker 810900349A, BPACT14WT
@litinoveweedle
Copy link
Owner

Hello,
thank you for your contribution. All checks passed, good work. I am just little bit baffled by the new json file names.... ;-) I know that there is no strict naming convention, but still those numbers look rather different. Is there any explanation for it? Thank you.

@Stromboli94
Copy link
Author

Hello, thank you for your contribution. All checks passed, good work. I am just little bit baffled by the new json file names.... ;-) I know that there is no strict naming convention, but still those numbers look rather different. Is there any explanation for it? Thank you.

The numbers:

  • 73756214
  • 810900349
    were taken from the model numbers of the remote controls (since in theory, these codes will work for any device which uses these model of remotes).
    The number:
  • 613
    This is the number of commandments in the Torah (Jewish holy book). I set up a Home Assistant instance for my synagogue so this seemed a fitting number for their AC codes.

@litinoveweedle
Copy link
Owner

Thank you for an explanation. I don't want to dispute with divine powers, but so far the number was based on the sequential numbering in device manufacturing groups. This is mostly for the users benefits when searching for the proper device file (as the listing in the documentation is done in the order of the fine name - therefore the by the numbers). Please let me know, if you would consider renaming files to fit better into this default sorting. Thank you.

@Stromboli94
Copy link
Author

I don't mind at all if the files are re-named. One potential issue I was also trying to avoid is creating a file name which exists in another PR. It might make sense to sort the files based on manufacturer name rather than file name.

@Stromboli94
Copy link
Author

Files have been renamed to better fit the current naming convention.

@litinoveweedle litinoveweedle merged commit 8cf4359 into litinoveweedle:master Sep 22, 2024
5 checks passed
@Stromboli94 Stromboli94 deleted the Stromboli94 branch September 25, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants