substitutions: name: bedside_lamp friendly_name: Bedside Lamp transition_length: 1s # Use your own preferences for these components. wifi: #ssid: "Your-SSID" #password: "Your-Password" #use_address: 192.168.10.12 # # Enable fallback hotspot (captive portal) in case wifi connection fails #ap: # ssid: "Bedside_lamp_$name" # password: "bedside2021" captive_portal: api: ota: logger: # Special platform + package are used for enabling unicore and disabling the # efuse mac crc check. These two changes are required for the ESP32-WROOM-32D # that is used in the Yeelight bedside lamp 2. esphome: name: $name platform: ESP32 board: esp32doit-devkit-v1 platformio_options: platform: espressif32@1.11.0 platform_packages: |-4 framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4 light: - platform: yeelight_bs2 name: ${friendly_name} RGBW Light master1: master1 master2: master2 default_transition_length: ${transition_length} # You can use any effects that you like. These are just examples. effects: - random: name: "Slow Random" transition_length: 30s update_interval: 30s - random: name: "Fast Random" transition_length: 3s update_interval: 3s # The device uses two I2C busses. i2c: # This bus is very likely connected to an EEPROM that can be found # on the lamp's board, right next to the GND, TX, RX and GPIO0 debug # pads. The exact use of this component has not yet been reverse # engineered. - id: eeprom_i2c sda: GPIO17 scl: GPIO18 scan: True # This bus is connected to the front panel with the touch buttons. # The touch panel is fully separated form the main board and ESP32, # and communication is done strictly through I2C. The exact protocol # has been reverse engineered and can be found in the file # "doc/reverse_engineering/I2C protocol/i2c_commands.txt". - id: front_panel_i2c sda: GPIO21 scl: GPIO19 scan: True output: - platform: gpio id: master1 pin: GPIO33 - platform: gpio id: master2 pin: GPIO4