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.

79 lines
1.7 KiB

  1. substitutions:
  2. name: bedside_lamp
  3. friendly_name: Bedside Lamp
  4. transition_length: 1s
  5. # Use your own preferences for these components.
  6. wifi:
  7. captive_portal:
  8. api:
  9. ota:
  10. logger:
  11. # Special platform + package are used for enabling unicore and disabling the
  12. # efuse mac crc check. These two changes are required for the
  13. # ESP32-WROOM-32D that is used in the Yeelight bedside lamp 2.
  14. esphome:
  15. name: $name
  16. platform: ESP32
  17. board: esp32doit-devkit-v1
  18. platformio_options:
  19. platform: espressif32@1.11.0
  20. platform_packages: |-4
  21. framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4
  22. # The device uses two I2C busses.
  23. i2c:
  24. - id: eeprom_i2c
  25. sda: 17
  26. scl: 18
  27. scan: True
  28. - id: front_panel_i2c
  29. sda: 21
  30. scl: 19
  31. scan: True
  32. # The device uses six GPIO pins for driving the LED circuitry.
  33. output:
  34. - platform: gpio
  35. id: master1
  36. pin: GPIO33
  37. - platform: gpio
  38. id: master2
  39. pin: GPIO4
  40. - platform: ledc
  41. id: led_r
  42. pin: GPIO13
  43. frequency: "3000Hz"
  44. - platform: ledc
  45. id: led_g
  46. pin: GPIO14
  47. frequency: "3000Hz"
  48. - platform: ledc
  49. id: led_b
  50. pin: GPIO5
  51. frequency: "3000Hz"
  52. - platform: ledc
  53. id: led_w
  54. pin: GPIO12
  55. frequency: "3000Hz"
  56. light:
  57. - platform: yeelight_bs2
  58. name: ${friendly_name} Custom Light
  59. red: led_r
  60. green: led_g
  61. blue: led_b
  62. white: led_w
  63. master1: master1
  64. master2: master2
  65. default_transition_length: ${transition_length}
  66. effects:
  67. - random:
  68. name: "Slow Random"
  69. transition_length: 30s
  70. update_interval: 30s
  71. - random:
  72. name: "Fast Random"
  73. transition_length: 3s
  74. update_interval: 4s