I’ve been working on this to control and automate my AC unit (LG) for starter, I wanted everything to be simple to figure out what I need in the future, because its kinda of a waste to use a nodemcu just for this. The idea is simple, but I figured I would share as I go so if anyone else searching for something similar or have a better way to do things.
I am using a NodeMcu with IR led connected to it sending the codes to turn off the AC or turn it on with mode auto and temp 25 which is simple enough.
here is my arduino sketch
and here is the switch in home assistant
switch: - platform: mqtt name: "AC" command_topic: "ac/state" payload_on: "1" payload_off: "0" retain: true
next thing i want to do is the mount the NodeMcu on the AC unit and connect a photoresistor and use it to know the status of the AC to be certain if its off or on. and since Im using the IRremote any way, I might as well control the wall mounted fan and could try to control the TV/media stuff as well if I could figure a way to position the the device in a place where the IR led can send the signal to everything. while i am at it, a simple dht11 sensor to monitor indoor temp and humidity wouldn’t hurt.