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:

1 Like

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.

Hi all. I wonder if you can help me. Trying to include a second AC controller using a second RM4 mini but getting this second entity as unavailable:

</>
smartir:

climate:
#this is the broadlink and neded changes are in its integration

  • platform: smartir
    name: ac_diningroom
    unique_id: ac_diningroom
    device_code: 1101
    controller_data: remote.ac_diningroom
    temperature_sensor: sensor.th_sensor_living_room_temperature
    humidity_sensor: sensor.th_sensor_living_room_humidity

  • platform: smartir
    name: ac_livingroom
    unique_id: ac_livingroom
    device_code: 1101
    controller_data: remote.ac_livingroom
    temperature_sensor: sensor.th_sensor_living_room_temperature
    humidity_sensor: sensor.th_sensor_living_room_humidity
    </>

Any suggestion?

Can you please format your code properly?

Hi thanks for the input…however, it is the first time pasting code here…hope that this is ok now

- platform: smartir
name: ac_diningroom
unique_id: ac_diningroom
device_code: 1101
controller_data: remote.ac_diningroom
temperature_sensor: sensor.th_sensor_living_room_temperature
humidity_sensor: sensor.th_sensor_living_room_humidity

- platform: smartir
name: ac_livingroom
unique_id: ac_livingroom
device_code: 1101
controller_data: remote.ac_livingroom
temperature_sensor: sensor.th_sensor_living_room_temperature
humidity_sensor: sensor.th_sensor_living_room_humidity

Your indentation is wrong. See below

climate:
  - platform: smartir
    name: ac_diningroom
    unique_id: ac_diningroom
    device_code: 1101
    controller_data: remote.ac_diningroom
    temperature_sensor: sensor.th_sensor_living_room_temperature
    humidity_sensor: sensor.th_sensor_living_room_humidity

  - platform: smartir
    name: ac_livingroom 
    unique_id: ac_livingroom
    device_code: 1101
    controller_data: remote.ac_livingroom
    temperature_sensor: sensor.th_sensor_living_room_temperature
    humidity_sensor: sensor.th_sensor_living_room_humidity

FYI, I posted almost this exact same thing only a few post above…

thank you…actually it was a copy paste issue from my end. The code is exaclty as you suggest. Would you have any other idea? Thank you

this is all the code. All working well, except living room

- platform: smartir
    name: ac_diningroom
    unique_id: ac_diningroom
    device_code: 1101
    controller_data: remote.ac_diningroom
    temperature_sensor: sensor.th_sensor_living_room_temperature
    humidity_sensor: sensor.th_sensor_living_room_humidity

  - platform: smartir
    name: ac_livingroom
    unique_id: ac_livingroom
    device_code: 1101
    controller_data: remote.ac_livingroom
    temperature_sensor: sensor.th_sensor_living_room_temperature
    humidity_sensor: sensor.th_sensor_living_room_humidity

  - platform: smartir
    name: ac_kikeroom
    unique_id: ac_kikeroom
    device_code: 1101
    controller_data: remote.ac_kikeroom
    temperature_sensor: sensor.shellyplusht_441793d0c624_temperature
    humidity_sensor: sensor.shellyplusht_441793d0c624_humidity
    
  - platform: smartir
    name: ac_nenaroom
    unique_id: ac_nenaroom
    device_code: 1101
    controller_data: remote.ac_nenaroom
    temperature_sensor: sensor.th_sensor_office_temperature
    humidity_sensor: sensor.th_sensor_office_humidity

  - platform: smartir
    name: ac_mastersuite
    unique_id: ac_mastersuite
    device_code: 1101
    controller_data: remote.ac_mastersuite
    temperature_sensor: sensor.th_mastersuite_temperature
    humidity_sensor: sensor.th_mastersuite_humidity

  - platform: smartir
    name: ac_kidssuite
    unique_id: ac_kidssuite
    device_code: 1101
    controller_data: remote.ac_kidssuite
    temperature_sensor: sensor.th_mastersuite_temperature
    humidity_sensor: sensor.th_mastersuite_humidity

Are you using the new / maintained fork of SmartIR ?

Sorry…not sure if i follow you. I am using the smart ir integration, and followed docs for the configuration.
Used this one - GitHub - smartHomeHub/SmartIR: Home Assistant integration to manage climate systems, TVs, fans and lights using IR/RF controllers. Compatible with Broadlink, Xiaomi, MQTT, LOOKin and ESPHome

Due to the original SmartIR not getting updated for a while there was a fork of the repo created. The original is now being updated again but I think the fork is still being looked after better these days.

I would check that this entity exists / is working:

Well, no idea what happened here, but I went to the dev tools, searched the entity, forced the state from “unavailable” to “off” (as the others were) and it seems it fixed it (at least for now). That was a first for me. Many thanks