How to get the correct state of an ac unit

I’ve been looking around for a way to control my air conditioning units, using an infrared device, connected to home assistant.

I found a few options, but the one issue I couldn’t figure out is how to get the status of the ac unit, if someone uses it’s remote control to turn it on, or off.

The issue is this:

I turn on the ac, through home assistant, so the toggle switch shows that it’s on. If someone uses the ac remote to turn it off, the new state of the ac, is not correctly represented in home assistant. It still displays it as on. So when I turn it off through home assistant, I’m actually turn it on again.

How do I solve this issue? Ideally with a device priced under $20. (I have 8 ac units)



  1. Hide the original remote controls and just use home assistant only

  2. There are some units were you can build a circuit using an esp8266 or pi to interface with the AC main board.

  3. Add a door sensor to the AC unit, then you know if it is on or off, it wont tell you what mode or temp it is set to though, use that to update home assistant on the status.

thanks for your reply. from the listed options I can tell that there’s really no proper way of doing this without either hacking into the ac (with all the dangers that implies), or without installing a device that detects if the ac flaps have been opened (which would look weird). the first one is not really an option, because wife. :wink:

Hopefully in the future a more viable solution will be developed.

Hide away the remote is pretty easy. Once I got mine setup through the UI and Google Assistant I stopped using mine. Might take a bit to locate it now as its been that long.

here is a picture of the door sensor.

I’m not sure what you could use because there are many different ways to set up an AC device but I’m sure you could find something that senses the power draw of the unit and then decide from that if the AC is on or off.

That is exactly what I am doing. I have an IR blaster that uses REST commands to control the AC, and the AC is plugged to a Sonoff S31 running Tasmota. I use a template switch that gets its state from the power sensor in the Sonoff:

  - platform: template
        value_template: "{% if states('sensor.1f_s_ac_power') | float > 3 %}true{%else%}false{% endif %}"
          service: script.turn_on_1f_s_ac #IR blaster rest command (turn ON)
          service: script.turn_off_1f_s_ac #IR blaster rest command (turn OFF)
1 Like

My plan is to have a IR receiver near the a/c that detects any commands sent to the a.c. unit and the updates HA. Haven’t started looking at it yet but is my next project.

Any progress? I have same idea :slight_smile:
But the door sensor could work too :wink: