Trying to configure SmartIR to work with my Air conditioner but getting a bit stuck setting up a 'config flow'

I’m new to HA and getting a bit stuck on something I think should be straight forward if someone can point me in the right direction. I have added SmartIR as a custom repository using HACS however the next step in the instructions I can’t figure out. They are:

“Config Flow - Integrations can be set up via the user interface by adding support for a config flow to create a config entry. Components that want to support config entries will need to define a Config Flow Handler.”

I have been going round in circles trying to figure out how to do this. Is this simply copying the suggested code on Git into the configuration.yaml file and restarting HA?

I also came across this and I don’t understand what it is referring to:

“Updating the manifest​ - You need to update your integrations manifest to inform Home Assistant that your integration has a config flow. This is done by adding config_flow: true to your manifest (docs)”

Thanks for any guidance here!

Those are developer instructions. Where do you see that?

Just follow the SmartIR instructions regarding HACS (GitHub - smartHomeHub/SmartIR: Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)) then add it through HACS itself

Thanks @koying - yes I added the repository through HACS. The next step in those instructions is where I’m getting stuck in the Platform setup instructions which has a link to the Climate setup. In that part of the instructions it says I need to:

“Add a Broadlink RM device named “Bedroom” via config flow” - this is the bit I’m not clear about.

Here’s a link to the page

That part is for when your AC is NOT on the list of already supported devices…
Those json’s are already included when installed by HACS

If your device is on the list, you need to mark this code, and enter it in here for a broadlink-controller

if not supported, it is another story, you need to create the json file yourself by learning the IR codes (and store them in the json).
The author of the addon would appreciate it if you push that json to the repository (as i did with for my TristarAC-2760.json), if everyone that uses this addon does that, the list will grow more (as it already has grown a lot)

PS I can recommend to use BroadlinkManager to capture the IR codes which worked very nice for me

Thanksaceindy. Yes, mine is supported and I have the code. I have the device number. Where do I put this code below? The instructions state “Add a Broadlink RM device named “Bedroom” via config flow” but I don’t understand what ‘via config flow’ means.

Smartir:

climate:

  • platform: smartir
    name: Office AC
    unique_id: office_ac
    device_code: 1000
    controller_data: remote.bedroom_remote
    temperature_sensor: sensor.temperature
    humidity_sensor: sensor.humidity
    power_sensor: binary_sensor.ac_power

By config flow he means the configuration.yaml (or any !include you might be using)

smartir:
climate:
  - platform: smartir
    name: [[ any name you want to use ]]
    unique_id: [[ any unique id you want to give it ]]
    device_code: [[ your device code drom the list]]
    controller_data: [[ the entity name you use for your broadlink controller in HA]]
    temperature_sensor: [[ the entity name of your temperature sensor ]]
    humidity_sensor: [[ optionally your humidity sensor]]
    power_sensor: [[ optionally your ac_power sensor]]

so for example mine:


smartir:
climate:
  - platform: smartir
    name: Master bedroom AC
    unique_id: masterbedroom_ac
    device_code: 2760
    controller_data: remote.wi_fi_master_bedroom
    temperature_sensor: sensor.masterbedroom_humidity
    humidity_sensor: sensor.masterbedroom_humidity
#    power_sensor: 


1 Like

Brilliant, thanks! All working now. I guess I could have just tried updating the configuration.yaml and ‘see what happens’ but I’m very much still learning and don’t want to break anything just yet.

@charsiufan Then please mark it as solved by selecting the solution (so it will help others finding this info :wink:

Done. Thanks for reminder :wink:

@charsiufan your own post is the solution??

Sorry, must have been having a total brain fog day :sweat_smile: :sweat_smile:!

I’ve marked the correct solution.

I have done just that but my climate-component does not send the right codes it seems. If I send the ir codes with a stand alone script they work, but if I insert the exact same code in the json and restart HA it still wont work. a 23C setting that should make my AC work hard only puts it in standby mode pulling 17Watts or so… I’m using a json from a similair fujitsu model to mine and I only changed out the codes that I use mostly. What did I miss??? :confused:

I have a random non-listed climate device (Bonaire). Do I just choose a device number like 4242?
Also, Broadlink Manager was listed above specifically for Docker, is there another one that works/has setup instructions to capture the IR codes for my setup (Rasp Pi image install, I think it’s Core with HACS on it)
I have 2 buttons (on/off) working which is weird since the other captured base64 codes (temps) don’t work - I used this Broadlink IR Capturer

Yes, just choose, just make sure the ID is not previously used for another set.

And if you decide to upload the code to github, the owner will probably give it another ID.

Not sure about other ways to capture, I use the docker (which I installed on a seperate linux host on vmware)