You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1 KiB

  1. esphome:
  2. name: $name
  3. platform: ESP32
  4. board: esp32doit-devkit-v1
  5. platformio_options:
  6. platform: espressif32@1.11.0
  7. platform_packages: |-4
  8. framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4
  9. includes:
  10. - esphome-yeelight_bs2/yeelight_bs2.h
  11. # Enable logging
  12. logger:
  13. # The front panel of the device uses I2C for communication
  14. # with the ESP32 main board. The panel uses ID 0x10.
  15. i2c:
  16. sda: 17
  17. scl: 18
  18. scan: True
  19. output:
  20. - platform: gpio
  21. id: master1
  22. pin: GPIO33
  23. - platform: gpio
  24. id: master2
  25. pin: GPIO4
  26. - platform: ledc
  27. id: led_r
  28. pin: GPIO13
  29. - platform: ledc
  30. id: led_g
  31. pin: GPIO14
  32. - platform: ledc
  33. id: led_b
  34. pin: GPIO5
  35. - platform: ledc
  36. id: led_w
  37. pin: GPIO12
  38. light:
  39. - platform: custom
  40. lambda: |-
  41. auto bs2light = new esphome::rgbww::YeelightBedsideLampV2LightOutput(
  42. led_r, led_g, led_b, led_w, master1, master2);
  43. App.register_component(bs2light);
  44. return {bs2light};
  45. lights:
  46. - name: ${friendly_name} RGBW Light
  47. default_transition_length: ${transition_length}