SmartIR - how to edit the configuration.yaml for a second AC

This is my SmartIR to control one of my ACs. I would like to control a second AC from a different Broadlink remote but I can’t get the YAML to load if I add a second AC into the file. I was copying the platform section and giving it a different name but doesn’t seem to work.

smartir:

climate:
  - platform: smartir
    name: Lounge AC
    unique_id: lounge_ac
    device_code: 1382
    controller_data: remote.broadcomlounge
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity
    power_sensor: binary_sensor.ac_power

What error are you getting? I used to have 2 without issues, although I now only have 1.

Hi Michael, The YAML won’t load. I have reverted it back to the one AC setup so not getting an error but would you mind to share how the 2 AC config looks in YAML? I have tried various options like having 2 climate: sections, 2 smartir: sections etc but no combination seems to work. I’m sure its just my lack of YAML knowledge that is stopping it working. One example I’ve tried which doesn’t work shown below:

smartir:

climate:
  - platform: smartir
    name: Lounge AC
    unique_id: lounge_ac
    device_code: 1382
    controller_data: remote.broadcomlounge
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity
    power_sensor: binary_sensor.ac_power

climate:     <--- added new climate section
  - platform: smartir
    name: Bedroom AC.   <--- Changed the device name
    unique_id: bedroom_ac   <--- Changed the unique_id
    device_code: 1382
    controller_data: remote.broadcombedroom     <--- changed the remote to a second broadlink pro
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity
    power_sensor: binary_sensor.ac_power

The following could be relevant:

You can’t have climate: listed twice. Simply remove the second one. This is not a SmartIR issue, it applies to any domain in HA.

smartir:

climate:
  - platform: smartir
    name: Lounge AC
    unique_id: lounge_ac
    device_code: 1382
    controller_data: remote.broadcomlounge
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity
    power_sensor: binary_sensor.ac_power


  - platform: smartir
    name: Bedroom AC.   <--- Changed the device name
    unique_id: bedroom_ac   <--- Changed the unique_id
    device_code: 1382
    controller_data: remote.broadcombedroom     <--- changed the remote to a second broadlink pro
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity
    power_sensor: binary_sensor.ac_power

Thanks. That fixed it. I thought I’d tried that permutation but obviously not. Appreciate the response.