Control the air conditioner

I got all the, just the card I don’t have.
Still it doesn’t work like it should.

  • platform: broadlink
    mac: ‘24:df:a7:42:c6:8b’
    type: “rm_mini”
    friendly_name: “Mainroom IR”


  • platform: smartir
    name: Main AC
    unique_id: main_ac
    device_code: 1180
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity

The only thing I can suggest is that the IR codes don’t match, i.e. that your aircon is a slighly different model.

When you move the slider to a new temperature, your aircon will only get one code when you stop moving it, that code comprises the temperature, fan speed and mode. The air con should normally acknoweledge receipt of a valid sequence, mine beeps.

If you don’t have a card defined I am not sure how you are controlling the component? Through service calls?

Yes, through service calls

I suggest you create a suitable thermostat card, turn on the a/c using one of the mode buttons below the temperature display and then see if you can set the temperature using the circular slider.

If that doesn’t work then it’s probably time to ask some questions on the other thread.

Hi there, my AC model is not on the supported list is there an easier way to add support, or I have to manually learn all the codes?

Hi Tom

Are you able to share the automation configuration you are using?


There’s nearly 400 lines of code to my lounge heating and cooling automations so I pastebinned it:

These take care of:

  • manually selecting a heating or cooling mode
  • scheduled heating and cooling on/off
  • switching off the heating/cooling if an external door or window is opened
  • manual temperature set point adjustment
  • automatically boosting/retarding the heat or cooling power as required to quickly get to the set point
  • automatic temperature set point adjustment based on season and morning weather forecast

There are also a bunch of binary sensors associated with these automations:

Thanks Tom… need to block out some ‘thinking’ time :slight_smile:

Hi, team. I was starting from this topic, so sharing my end configuration with you.
Thanks all for the ideas and inspiration.
Please take a look if it will help someone

hi everyone… I’m using SmartIR at its mention on monitoring the AC whether the status is ON/OFF. Anyone have idea how to do that?

Hello there. Can I view the shell_command codes? I am trying to study how you are controlling the aircon.

- id: lounge_aircon_manual
  alias: 'Lounge Room Aircon'
  initial_state: true
    platform: state
    entity_id: input_select.lounge_ac_mode
  - service_template: >
      {% if is_state('input_select.lounge_ac_mode', 'Powerful Heat') %} shell_command.lounge_ac_powerful_heat
      {% elif is_state('input_select.lounge_ac_mode', 'Normal Heat') %} shell_command.lounge_ac_normal_heat
      {% elif is_state('input_select.lounge_ac_mode', 'Silent Heat') %} shell_command.lounge_ac_silent_heat
      {% elif is_state('input_select.lounge_ac_mode', 'Powerful Cool') %} shell_command.lounge_ac_powerful_cool
      {% elif is_state('input_select.lounge_ac_mode', 'Normal Cool') %} shell_command.lounge_ac_normal_cool
      {% elif is_state('input_select.lounge_ac_mode', 'Silent Cool') %} shell_command.lounge_ac_silent_cool
      {% elif is_state('input_select.lounge_ac_mode', 'Dry') %} shell_command.lounge_ac_dry
      {% elif is_state('input_select.lounge_ac_mode', 'Off') %} shell_command.lounge_ac_off
      {% endif %}
  - service_template: >
      {% if is_state('input_select.lounge_ac_mode', 'Silent Heat') %} script.fireplace_25
      {% elif is_state('input_select.lounge_ac_mode', 'Normal Heat') %} script.fireplace_75
      {% elif is_state('input_select.lounge_ac_mode', 'Powerful Heat') %} script.fireplace_100
      {% else %} script.fireplace_0
      {% endif %}
lounge_ac_dry: 'curl -k "{{states.input_number.lounge_ac_temp_set_cool.state | int}}&f=176&a=16&s=1"'
lounge_ac_off: 'curl -k "{{states.input_number.lounge_ac_temp_set_heat.state | int}}&f=160&a=0&s=0"'
lounge_ac_normal_cool: 'curl -k "{{states.input_number.lounge_ac_temp_set_cool.state | int}}&f=160&a=0&s=1"'
lounge_ac_normal_heat: 'curl -k "{{states.input_number.lounge_ac_temp_set_heat.state | int}}&f=160&a=0&s=1"'
lounge_ac_powerful_cool: 'curl -k "{{states.input_number.lounge_ac_temp_set_cool.state | int}}&f=160&a=1&s=1"'
lounge_ac_powerful_heat: 'curl -k "{{states.input_number.lounge_ac_temp_set_heat.state | int}}&f=160&a=1&s=1"'
lounge_ac_silent_cool: 'curl -k "{{states.input_number.lounge_ac_temp_set_cool.state | int}}&f=176&a=16&s=1"'
lounge_ac_silent_heat: 'curl -k "{{states.input_number.lounge_ac_temp_set_heat.state | int}}&f=176&a=16&s=1"'

Thank you. also, how did you create the binary_sensor.lounge_room_dht_status. This is a good check. I notice one of my dht22 sensors at times, lose connections after restarting HA.

Thank you! One last question. I have added the automation to HA. The am/pm automation triggers when it falls below the target temperature. Does the automation stops the Aircon if temperature goes above the target temperature? I think not due to this line.

  - condition: state # Only if AC is off (prevents oscillation between heat and cool mode if temperature over/undershoots set point)
    entity_id: input_select.lounge_ac_mode
    state: 'Off'

No the AC only turns off at the time in the off input datetime. The thermostat in the AC puts itself in a low power mode once the target temp is met.

Hello Tom,
I have implemented your codes to my aircon and got it working. Is it safe to delete all the entity_id in the sensors templates to keep inline with the updates?

Yes except for the templates that use now() you should add this line to those templates:

        {% set update = states('sensor.time') %}

After you update to v0.117 you can delete these added lines. See Heads up! Upcoming breaking change in the Template integration

1 Like