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.

78 lines
1.8 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. # Special platform + package for enabling unicore and disabling the efuse mac crc check.
  20. # These two changes are required for the ESP32-WROOM-32D that is used in the
  21. # Yeelight bedside lamp 2.
  22. platform: espressif32@1.11.0
  23. platform_packages: |-4
  24. framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4
  25. light:
  26. - platform: yeelight_bs2
  27. name: ${friendly_name} Custom Light
  28. red: led_red
  29. green: led_green
  30. blue: led_blue
  31. white: led_white
  32. master1: master1
  33. master2: master2
  34. default_transition_length: 1s
  35. effects:
  36. - random:
  37. name: "Slow Random"
  38. transition_length: 30s
  39. update_interval: 30s
  40. - random:
  41. name: "Fast Random"
  42. transition_length: 3s
  43. update_interval: 4s
  44. # The device uses two I2C busses.
  45. i2c:
  46. - id: eeprom_i2c
  47. sda: GPIO17
  48. scl: GPIO18
  49. scan: True
  50. - id: front_panel_i2c
  51. sda: GPIO21
  52. scl: GPIO19
  53. scan: True
  54. # The device uses six GPIO pins for driving the LED circuitry.
  55. output:
  56. - platform: gpio
  57. id: master1
  58. pin: GPIO33
  59. - platform: gpio
  60. id: master2
  61. pin: GPIO4
  62. - platform: ledc
  63. id: led_red
  64. pin: GPIO13
  65. - platform: ledc
  66. id: led_green
  67. pin: GPIO14
  68. - platform: ledc
  69. id: led_blue
  70. pin: GPIO5
  71. - platform: ledc
  72. id: led_white
  73. pin: GPIO12