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.

69 lines
1.6 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 address 0x2C.
  15. # There are two I2C busses attached to the ESP32:
  16. # SDA 17/SCL 18 and SDA 21/SCL 19. The latter is the
  17. # correct one for the front panel. The former is probably
  18. # an EEPROM of some sorts.
  19. i2c:
  20. - id: eeprom_i2c
  21. sda: 17
  22. scl: 18
  23. scan: True
  24. - id: front_panel_i2c
  25. sda: 21
  26. scl: 19
  27. scan: True
  28. output:
  29. - platform: gpio
  30. id: master1
  31. pin: GPIO33
  32. - platform: gpio
  33. id: master2
  34. pin: GPIO4
  35. - platform: ledc
  36. id: led_r
  37. pin: GPIO13
  38. - platform: ledc
  39. id: led_g
  40. pin: GPIO14
  41. - platform: ledc
  42. id: led_b
  43. pin: GPIO5
  44. - platform: ledc
  45. id: led_w
  46. pin: GPIO12
  47. light:
  48. - platform: custom
  49. lambda: |-
  50. auto bs2light = new esphome::rgbww::YeelightBedsideLampV2LightOutput(
  51. led_r, led_g, led_b, led_w, master1, master2);
  52. App.register_component(bs2light);
  53. return {bs2light};
  54. lights:
  55. - name: ${friendly_name} RGBW Light
  56. default_transition_length: 0s
  57. effects:
  58. - random:
  59. name: "Slow Random"
  60. transition_length: 30s
  61. update_interval: 30s
  62. - random:
  63. name: "Fast Random"
  64. transition_length: 3s
  65. update_interval: 4s