From 4678a7c7de9622c22e5f8fd7b898914db205e7df Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Wed, 25 Aug 2021 07:32:57 +0200 Subject: [PATCH] Added remote receiver/transmitter config. Captured and inserted a Samsung and Yamaha power button raw code. Receive somewhat consistent, transmit flaky - maybe hardware? --- esphome/sleepingroom.yaml | 42 ++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/esphome/sleepingroom.yaml b/esphome/sleepingroom.yaml index 2e500d7..059f405 100644 --- a/esphome/sleepingroom.yaml +++ b/esphome/sleepingroom.yaml @@ -150,8 +150,40 @@ sensor: address: 0x76 update_interval: 60s -script: - - id: startup_animation - then: - - delay: 5s - - \ No newline at end of file +remote_receiver: + pin: + number: 23 + inverted: true + dump: all + +remote_transmitter: + pin: GPIO22 + # Infrared remotes use a 50% carrier signal + carrier_duty_percent: 50% + +switch: + - platform: template + name: Yamaha Power Button + turn_on_action: + - remote_transmitter.transmit_raw: + carrier_frequency: 38kHz + # Yamaha power button + code: [ 9922, -3533, 2643, -699, 1542, -700, 1543, -699, 1540, -702, + 1540, -702, 1540, -703, 2660, -703, 8266, -703, 2657, -707, + 2655, -708, 2654, -710, 3773, -712, 2651, -712, 2651, -713, + 2650, -717, 11, -2, 1510, -733, 1507, -5652, 9905, -1301, + 1510 ] + - platform: template + name: Samsung Power Button + turn_on_action: + - remote_transmitter.transmit_raw: + carrier_frequency: 38kHz + # Samsung power button + code: [ 5430, -3513, 1515, -724, 1519, -723, 1519, -723, 7157, -723, + 1519, -722, 1518, -724, 8284, -724, 8284, -724, 2645, -724, + 1519, -723, 1517, -725, 1517, -725, 1518, -724, 1517, -725 ] +#script: +# - id: startup_animation +# then: +# - delay: 5s +# - \ No newline at end of file