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
rossk
June 15, 2023, 6:05am
4
The following could be relevant:
opened 12:31PM - 24 Jan 23 UTC
closed 03:42PM - 11 Jun 23 UTC
<!-- Before you open a new issue, search through the existing issues to see if o… thers have had the same problem.
Issues not containing the minimum requirements will be closed:
- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
- Issues without configuration will be closed
-->
<!-- Your contribution with your own code files is welcome. However, we do not accept incomplete files as well as files related to MQTT controllers.
-->
Home Assistant 2023.1.7
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230110.0 - latest
Smartir 1.17.6
```yaml
#Infrarrojos aire acondicionado mitshubishi dormitorio
smartir:
climate:
- platform: smartir
name: Dormitorio AC
unique_id: Dormitorio_ac
device_code: 1129
controller_data: remote.broadlink_dormitorio
temperature_sensor: sensor.broadlink_dormitorio_temperature
humidity_sensor: sensor.broadlink_dormitorio_humidity
#Infrarrojos aire acondicionado mitshubishi salon
smartir:
climate:
- platform: smartir
name: Salon AC
unique_id: Salon_ac
device_code: 1129
controller_data: remote.broadlink_salon
temperature_sensor: sensor.broadlink_salon_temperature
humidity_sensor: sensor.broadlink_salon_humidity
```
**Describe the bug**
No two identical devices can be installed. I have changed the unique identifier.
I have two air conditioners with two different broadlink devices and it won't let me use anything more than one.
**Debug log**
```text
2023-01-24 13:05:00.470 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "smartir". Check lines 17 and 30
2023-01-24 13:05:00.471 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "smartir". Check lines 30 and 40
2023-01-24 13:05:00.471 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "media_player". Check lines 32 and 42
2023-01-24 13:05:00.471 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "smartir". Check lines 40 and 51
2023-01-24 13:05:00.471 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/configuration.yaml contains duplicate key "climate". Check lines 19 and 53
```
**Additional context**
Add any other context about the problem here.
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 ?
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.
⏻ Control Home Assistant climate, fan, media_player and light devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome, ZHA) - litinoveweedle/SmartIR
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