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.

73 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 ESP32-WROOM-32D
  21. # 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. platform: espressif32@3.2.0
  28. platform_packages: |-4
  29. framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.6
  30. # This yeelight_bs2 comopnent acts as the hub for the device. Other
  31. # components talk to the hardware via this component. Normally, you
  32. # wouldn't need to change anything in the default implementation. You
  33. # can even fully omit this element from the configuration.
  34. # Only define this when you need different pin numbers or want to
  35. # assign specific ID's to the pin components.
  36. yeelight_bs2:
  37. red_id: TheRedOne
  38. red: GPIO13
  39. green_id: TheGreenOne
  40. green: GPIO14
  41. blue_id: TheBlueOne
  42. blue: GPIO5
  43. white_id: TheWhiteOne
  44. white: GPIO12
  45. master1_id: TheFirstMaster
  46. master1: GPIO33
  47. master2_id: TheSecondMaster
  48. master2: GPIO4
  49. sda: GPIO21
  50. scl: GPIO19
  51. trigger_pin: GPIO16
  52. # This component controls the light of the device.
  53. light:
  54. - platform: yeelight_bs2
  55. name: ${friendly_name} RGBW Light
  56. default_transition_length: ${transition_length}
  57. # You can use any effects that you like. These are just examples.
  58. effects:
  59. - random:
  60. name: "Slow Random"
  61. transition_length: 30s
  62. update_interval: 30s
  63. - random:
  64. name: "Fast Random"
  65. transition_length: 3s
  66. update_interval: 3s