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