Smart Home Automation Forum
Lesson30- How to decode IR signal and control air conditioning and TV by ESPHome - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: KC868-A series and Uair Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=6)
+--- Thread: Lesson30- How to decode IR signal and control air conditioning and TV by ESPHome (/showthread.php?tid=1220)



Lesson30- How to decode IR signal and control air conditioning and TV by ESPHome - admin - 11-30-2021


esphome:
  name: kc868-a4
  platform: ESP32
  board: esp32dev

# Enable logging
logger:

# Enable Home Assistant API
api:

wifi:
  ssid: "KinCony"
  password: "xxxxxxxx"


captive_portal:

web_server:
  port: 80

remote_receiver:
  pin:
    number: 23
    inverted: True
  dump: all

 
remote_transmitter:
  pin:
    number: 22
  carrier_duty_percent: 50%

switch:
  - platform: template
    name: "TV Power"
    turn_on_action:
      - remote_transmitter.transmit_nec:
          address: 0x00BD
          command: 0x807F
          repeat:
            times: 10
            wait_time: 50ms
    turn_off_action:
      - remote_transmitter.transmit_nec:
          address: 0x00BD
          command: 0x807F
          repeat:
            times: 10
            wait_time: 50ms