How can I make an Ecobee4 "control" a Smart Air Conditioner?

I have an Ecobee4 setup to control nothing, it’s only connected to power and not directly connected to any Heating or AC device. It does everything you’d expect an Ecobee to do, it just doesn’t actually have anything wired to it to react. So what I want it to do is act like it does, or more specifically, setup an automation to do that. Right now I’m just looking to have it deal with a specific LG WiFi connected AC, the Ecobee is connected to both the Ecobee cloud integration as well as the HomeKit controller integration. The AC is connected to the LG ThinQ integration and I can read and change either through Home Assistant.

What I want to do is create an automation to tie the two together. If the Ecobee is in “cooling” mode the AC is on, if not it’s off. Whatever the Ecobees temperature is set to the AC temperature gets set to. I’d also like to vary the mode based on conditions, like the AC has an “eco” mode, which works OK when demand is low, but quickly gets way off it’s mark if it’s not. I mean Ideally I’d like the AC to always be in eco mode when the temps agree within a degree or two AND the Ecobee is in cooling mode, and switch the AC to regular cooling mode if the current temperature rises by more than a couple degrees on the Ecobee above the set temp.

I’ve just started playing around with Home Assistant after all my Webcore routines took a dump last month on Smartthings, so I’m kinda starting all over again. I had a ton of Webcore pistons going so I’m kind of a newbie with lots of baggage. I have very little experience with any sort of automations in Home Assistant but already have hundreds and hundreds of devices paired. I’d actually had quite a few Ecobee automations in Webcore based on current weather and such, and was populating variables from one device to control another, which I’m quite certain can be done in Home Assistant, I’m just not sure how I do that.

I installed an Ecobee Premium recently, but I only have heating connected through my wiring. I wanted to control my Window AC automatically with my thermostat. You have to tell the Ecobee what wires you want it to think are connected by manually changing this in the configuration on the thermostat.

I got this working, and I am pretty impressed with how well it works with my Window AC. Window AC thermostats are widely inaccurate considering they’re right next to the cooling source as well as the outside. I just keep my Window AC target temperature set to 60 F the lowest possible so it will always run when the thermostat tells it to run. The thermostat turns it on when requesting cooling and turns it back off when it’s not requesting cooling. I also have some logic to either use the Window AC’s “Dry” or “Cool” mode depending on the humidity.

I am new to this so by no means is this perfect and is probably a good starting point for anyone else looking to do the same. You should just be able to copy these over and edit them in the visual editor in Home Assistant.

I have 4 separate Automations based on all the possible HVAC modes my thermostat can be in. You can check all attributes in the “Developer Tools” under “States”, “Set State” and typing in your entity.

1. Heating - Turns AC off

alias: Thermostat AC Off Heating
description: ""
trigger:
  - platform: template
    value_template: "{{ is_state_attr('climate.hk_thermostat_2', 'hvac_action', 'heating')}}"
condition: []
action:
  - device_id: aced727ca51bccc2cf992be9f681654c
    domain: climate
    entity_id: 91c7abb8cd796b334eb5482dfc7da704
    type: set_hvac_mode
    hvac_mode: "off"
mode: single

2. Idle - Turns AC off

alias: Thermostat AC Off Idle
description: ""
trigger:
  - platform: template
    value_template: "{{ is_state_attr('climate.hk_thermostat_2', 'hvac_action', 'idle')}}"
condition: []
action:
  - device_id: aced727ca51bccc2cf992be9f681654c
    domain: climate
    entity_id: 91c7abb8cd796b334eb5482dfc7da704
    type: set_hvac_mode
    hvac_mode: "off"
mode: single

3. None - Turns AC off

alias: Thermostat AC Off None
description: ""
trigger:
  - platform: template
    value_template: "{{ is_state_attr('climate.hk_thermostat_2', 'hvac_action', '')}}"
condition: []
action:
  - device_id: aced727ca51bccc2cf992be9f681654c
    domain: climate
    entity_id: 91c7abb8cd796b334eb5482dfc7da704
    type: set_hvac_mode
    hvac_mode: "off"
mode: single

4. Cooling - Checks Humidity, Turns AC on to “Cooling” or “Dry” mode

alias: Thermostat AC On Cool OR Dry
description: ""
trigger:
  - platform: template
    value_template: "{{ is_state_attr('climate.hk_thermostat_2', 'hvac_action', 'cooling')}}"
condition: []
action:
  - if:
      - condition: numeric_state
        entity_id: climate.hk_thermostat_2
        attribute: humidity
        below: sensor.hk_thermostat_current_humidity
    then:
      - device_id: aced727ca51bccc2cf992be9f681654c
        domain: climate
        entity_id: 91c7abb8cd796b334eb5482dfc7da704
        type: set_hvac_mode
        hvac_mode: dry
    else:
      - device_id: aced727ca51bccc2cf992be9f681654c
        domain: climate
        entity_id: 91c7abb8cd796b334eb5482dfc7da704
        type: set_hvac_mode
        hvac_mode: cool
mode: single

When I turn my AC on the If statement checks to see if my Target Humidity is below the Humidity. If it is then my AC turns on in “Dry” mode. If its not my AC turns on in “Cooling” mode.

The value_template just needs to be modified to include your thermostat, and thermostats corresponding “hvac_action”.

“{{ is_state_attr(‘climate.your_thermostat’, ‘hvac_action’, ‘cooling, heating, idle, etc.’)}}”

1 Like

Sorry haven’t checked in a while, so missed the reply, but interesting. I tore out all my previous HVAC system and replaced it a whole bunch of heat pump mini splits. So when I posted that I was dealing with one window unit connected to WiFi just doing AC, now I have 20 doing AC and heat, I have at least one in every room. As the weather is cooling off the curiosity is renewed. The mini splits are surprisingly localized (a good thing) I can have adjacent rooms be several degrees difference in temperature. Mini splits are at their most efficient when they are just running all the time. The LG units I put in are also supposed to be very accurate as far as temperature, although a lot varies from just a few feet in any direction.

Anyway, what I would like to do is to capture the set temp on the ecobee and just set the mini split to that temp. I can certainly read both the set and measured temp off the ecobee, but have no idea how to capture that number and then use that to set the mini split to that number. I’m still learning the world of HA automations, scenes and scripts. Created my first automation over the weekend and now I have about 20. I’m basically reproducing at least some of what I lost when WebCoRE/SmartThings went kaput, although there I was getting to the limit of what was practical, not on the WebCoRE end but the SmartThings part, I had more devices then a hub could control and few things were local.

I had gotten WebCoRE to the point where I was doing a lot of saving of device states so I could run an automation for some period of time and then put it back to the previous state regardless of what that was. That way I didn’t have a whole lot of things that required me to edit the automations, if my hallway lights were, I dunno, red but when I entered the hallway they turned to warm white, when I wasn’t there anymore they returned to red. But if I decided to change them to blue instead of red, they’d return to blue without any edits. Not unlike what I want to do with the ecobees, basically use it as a remote for the mini splits that can adapt based on my whims and whatever the temperature outside is doing. My issue with the ecobees was always the set temperature gap between heating and cooling. I want to be able to set the temp to a static number and have the automation determine whether heat or cool is the best way to get there based on what the weather outside is. For the next 6 months or so heating and air conditioning within the same day isn’t that unusual and even different in different parts of the house.

Copied this almost verbatim to control my Midea window AC! Sure beats spending $20k retrofitting my house for AC for a few weeks a year when it’s bad (for now…).

Thanks for figuring this out - it was a real head-scratcher!