I’ve been on a quest to fully integrate my Broadlink RM Mini 3 with Home Assistant, and I’m thrilled to share my journey and success! My goal was to control my air conditioner seamlessly, but I ran into a snag where I could only turn it on and not off. After some digging, I realized the issue was with the command codes in my configuration. I decided to document my entire process in case others are facing similar challenges.
The Setup
I started by adding the Broadlink RM Mini 3 to my Home Assistant setup. The initial configuration seemed straightforward, but I quickly noticed that while I could turn the air conditioner on, I couldn’t turn it off. This was frustrating because I knew the device was capable of both actions. I reached out to the Broadlink Manager app to verify the codes, and they worked perfectly there. So, why wasn’t Home Assistant replicating this behavior?
The Problem
After reviewing my configuration.yaml file, I realized that the issue might lie in how the commands were structured. I was using the same code for both command_on and command_off, which didn’t make sense. I needed to ensure that the codes for turning the device on and off were distinct and correctly formatted.
The Solution
I decided to revisit the Broadlink Manager app and carefully noted the hexadecimal codes for both turning the air conditioner on and off. I then updated my configuration.yaml to reflect these exact codes. Here’s what my final setup looks like:
yaml
switch:
- platform: broadlink
host: 192.168.1.143
type: rm_mini
mac: ‘XX:XX:XX:XX:XX:XX’
timeout: 15
switches:
aircon_living_room:
friendly_name: “Living Room AC”
command_on: ‘JgCSAAABJ5MWNhYRFhIWNRYSFhEWEhYSFjUWEhYRFjYWERYSFhIWERYSFhEWEhYRFhIWNRcRFhIWERYSFhEWEhY1FxEWNRcRFhIWNRYSFgACkBcRFhIWERYSFhEWEhYRFxEWERcRFhIWERYSFjUWEhYRFxEWEhYRFhIWERYSFhEXERYRFxEWEhYRFhIWNRY2FjUXAA0FAAAAAAAA’
command_off: ‘JgCSAAABKZIXNRYSFhEWEhYRFxEWEhYRFjYWERYSFjUXERYSFhEWEhYRFhIWERYSFhEXNRYSFhEWEhYRFhIWERc1FhIWNRYSFhEWNhYRFwACkBYSFhEWEhYRFhIWERcRFhIWERYSFhEWEhYRFjYWERcRFhIWERYSFhEWEhYRFxEWEhYRFhIWERYSFhEWNhY1FxEWAA0FAAAAAAAA’
The Automation
To ensure everything worked smoothly, I set up a couple of simple automations in my scripts.yaml file. These scripts allow me to turn the air conditioner on and off with just a few clicks:
yaml
living_room_aircon_on:
alias: Turn On Living Room Aircon
sequence:
- alias: Aircon On
service: switch.turn_on
data:
entity_id: switch.aircon_living_room
living_room_aircon_off:
alias: Turn Off Living Room Aircon
sequence:
- alias: Aircon Off
service: switch.turn_off
data:
entity_id: switch.aircon_living_room
The Outcome
After making these adjustments, I tested the setup thoroughly. To my delight, the air conditioner now turns on and off perfectly through Home Assistant! It’s amazing how a small tweak in the configuration can make such a big difference. I’m now confident in expanding this setup to other devices around my home.
A Word of Thanks
I’d like to extend a huge thank you to the Home Assistant community for their invaluable resources and support. Without the forums and the wealth of information shared by others, I wouldn’t have been able to troubleshoot and resolve this issue so efficiently. If you’re facing similar challenges, don’t hesitate to reach out—there’s always someone willing to help!
Happy automating everyone! ![]()