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)

Thanks

1 Like

Options

  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.
Thanks

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.

2 Likes

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:

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

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:

Turn off the input boolean for a while so the correct state can be set.

# Automation to change state input boolean to on
alias: AC on living room (via power state)
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: sensor.sonoff_1000ae6d95_power
    above: '10'
  condition:
  - condition: state
    entity_id: input_boolean.living_ac
    state: 'off'
  action:
  - service: automation.turn_off
    target:
      entity_id: automation.on_ac_living
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.living_ac
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: automation.turn_on
    target:
      entity_id: automation.on_ac_living
  mode: single

# Automation to change state input boolean to off
  alias: AC off livingroom (via power status)
  description: ''
  trigger:
  - platform: state
    entity_id: sensor.sonoff_1000ae6d95_power
    to: '0'
  condition:
  - condition: state
    entity_id: input_boolean.living_ac
    state: 'on'
  action:
  - service: automation.turn_off
    target:
      entity_id: automation.off_ac_living
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: input_boolean.turn_off
    target:
      entity_id: input_boolean.living_ac
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - service: automation.turn_on
    target:
      entity_id: automation.off_ac_living
  mode: single
1 Like

A quick google search I got this:
https://images.app.goo.gl/VDW4zeWCQbzUvabG6

I have also seen other threads in this forum using a CT clamp + MCU setup to track that the AC being on or off.

I love the door switch approach…my approach was far less elegant:

  1. open up the ac and expose the motor
  2. tape a vibration sensor to the fan blade

…the issue is eventually you have to change those batteries. Also the fan might get a bit loud. Door switch is the way to go.

My question though: is there a way to integrate this fix into the “climate” entity? As in, you press the cool button but it doesn’t change states until the door switch is broken?