Suggestions Needed: IR-Controlled Air Conditioner

Hello fellow HA-Scholars! I want some suggestions on a how-to. I’m familiar with YAML and HA capabilities, so I’m not looking for code, but just some qualitative thoughts on how to accomplish something.

Case: IR-Controlled DUMB Air Conditioner that has its own thermostat
Even though this has its own thermostat built in, I want to create a generic thermostat to control this (I know there will be some variation between its internal thermometer and the sensor.thermometer I have in the room, but this is okay).

I have an IR Blaster and was able to copy all relevant commands over from the remote control. PLEASE NOTE: the remote control tries to stay in sync with the AC unit, so trust me with what I’m describing below, even though it seems ridiculous.
IR Commands built in Tuya Cloud and brought into HA via scenes:

  • Power On
  • Power Off (I built the power on/off into a template switch, which has been working quite well)
  • Set 66°F
  • Set 67°F
  • Set 68°F
  • Set 69°F
  • Set 70°F
  • Set 71°F
  • Set 72°F (I could do more, but this is the extent I’ll use)

My thoughts:

  • Synchronize the template switch with climate.set_hvac_mode (cool=on, off=off)
  • Automation: when turned on, climate.set_temperature = 72
  • Series of automations:
    • Trigger: thermostat’s [set] temperature = 66, then Action: activate scene.set_temp_66
    • Trigger: thermostat’s [set] temperature = 67, then Action: activate scene.set_temp_67
      …and so on

I HATE needing to have so many automations, which is why I’m reaching out y’all here. Let me know if anyone has any other brainstorms. I felt like I rambled a bit, so if anyone needs clarification, I’ll provide whatever is needed.

Thanks in advance!

I think a good approach for your need could be to use the IR-Blaster and a temperature sensor with Generic Thermostat.
So create a switch for sending the on/off IR codes to the AC and then configure the Generic Thermostat associated to the themperature sensor and the switch.
Something like this (degrees are on C, not F) :

climate:
  - platform: generic_thermostat
    unique_id: GTerm
    name: termostato1
    heater: [the swith you created]
    target_sensor: [your temp sensor]
    ac_mode: true
    min_temp: 16
    target_temp: 26
    hot_tolerance: 1

Then you create an automation to send the IR code for temperature every time you modiffy the target temperature. (maybe 1 or more degree lower, depending how far your temp sensor is from the AC)

This is a great project. I was looking for exactly this to control my Air Cons.
To get me started, please can you show me what IR Blaster you used? Maybe a linked to what you used?
Thanks

I’ll get some hate because it’s 1) not locally run and 2) a Tuya product. But, I’ve had zero issues with the product, itself; in fact, I’ve been pleased in its operation. https://www.newegg.com/p/2S7-07JP-1HNV5

Great thanks.
I want to see if I can’t use an IR transmitter and attach it to a D1mini and ESPhome.
I’ll do some experimenting.
(I’m not proud to say but half my house is Tuya, the light switches can’t be flashed :frowning_face:)

Can you share your generic termostat yaml code?
I have similar implementation, I would recommend you unifying all thermostat automations in a single automation, using triggerId and choose.