Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESPHome Support for IR Transmitter #86

Open
BeatLink opened this issue Sep 22, 2024 · 0 comments
Open

Add ESPHome Support for IR Transmitter #86

BeatLink opened this issue Sep 22, 2024 · 0 comments

Comments

@BeatLink
Copy link

Hey, I wanted to know if ESPHome support could be added to the IR sensor. I already got a working config with this

esp8266:
  board: esp8285
  restore_from_flash: true

status_led:
  pin: GPIO13

binary_sensor:
  - platform: gpio
    pin: GPIO0
    id: physical_button

  - platform: status
    name: "IR Status"

remote_transmitter:
  pin:
    number: GPIO4
  carrier_duty_percent: 50%

remote_receiver:
  pin:
    number: GPIO5
    inverted: true
  dump: all

Heres what it would look like to add buttons to trigger signals (though this would probably be up to the user to configure)

switch:
  - platform: restart
    name: "Restart"

button:
  - platform: template
    name: Fan Toggle Power
    id: toggle_power
    on_press:
      - remote_transmitter.transmit_nec:
         address: 0xFE01
         command: 0x7C83
         command_repeats: 1
  - platform: template
    name: Fan Toggle Speed
    id: toggle_speed
    on_press:
      - remote_transmitter.transmit_nec:
         address: 0xFE01
         command: 0x7887
         command_repeats: 1
  - platform: template
    name: Fan Toggle Time
    id: toggle_time
    on_press:
      - remote_transmitter.transmit_nec:
         address: 0xFE01
         command: 0x748B
         command_repeats: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant