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.

87 lines
2.0 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. #ssid: "Your-SSID"
  8. #password: "Your-Password"
  9. #use_address: 192.168.10.12
  10. #
  11. # Enable fallback hotspot (captive portal) in case wifi connection fails
  12. #ap:
  13. # ssid: "Bedside_lamp_$name"
  14. # password: "bedside2021"
  15. captive_portal:
  16. api:
  17. ota:
  18. logger:
  19. # Special platform + package are used for enabling unicore and disabling the
  20. # efuse mac crc check. These two changes are required for the
  21. # ESP32-WROOM-32D that is used in the Yeelight bedside lamp 2.
  22. esphome:
  23. name: $name
  24. platform: ESP32
  25. board: esp32doit-devkit-v1
  26. platformio_options:
  27. # Special platform + package for enabling unicore and disabling the efuse mac crc check.
  28. # These two changes are required for the ESP32-WROOM-32D that is used in the
  29. # Yeelight bedside lamp 2.
  30. platform: espressif32@1.11.0
  31. platform_packages: |-4
  32. framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4
  33. light:
  34. - platform: yeelight_bs2
  35. name: ${friendly_name} Custom Light
  36. red: led_red
  37. green: led_green
  38. blue: led_blue
  39. white: led_white
  40. master1: master1
  41. master2: master2
  42. default_transition_length: 1s
  43. effects:
  44. - random:
  45. name: "Slow Random"
  46. transition_length: 30s
  47. update_interval: 30s
  48. - random:
  49. name: "Fast Random"
  50. transition_length: 3s
  51. update_interval: 4s
  52. # The device uses two I2C busses.
  53. i2c:
  54. - id: eeprom_i2c
  55. sda: GPIO17
  56. scl: GPIO18
  57. scan: True
  58. - id: front_panel_i2c
  59. sda: GPIO21
  60. scl: GPIO19
  61. scan: True
  62. # The device uses six GPIO pins for driving the LED circuitry.
  63. output:
  64. - platform: gpio
  65. id: master1
  66. pin: GPIO33
  67. - platform: gpio
  68. id: master2
  69. pin: GPIO4
  70. - platform: ledc
  71. id: led_red
  72. pin: GPIO13
  73. - platform: ledc
  74. id: led_green
  75. pin: GPIO14
  76. - platform: ledc
  77. id: led_blue
  78. pin: GPIO5
  79. - platform: ledc
  80. id: led_white
  81. pin: GPIO12