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@3.2.0 platform_packages: |-4 framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.6 # This component controls the light of the device. light: - platform: yeelight_bs2 name: ${friendly_name} RGBW Light 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 binary sensor is used to handle front panel touch events. binary_sensor: - platform: yeelight_bs2 id: ${name}_power_button part: power button on_press: then: - light.toggle: ${name} # The sensor is used to publish a slider level when the slider is touched. sensor: - platform: yeelight_bs2 id: ${name}_slider_level on_value: then: - light.turn_on: id: ${name} brightness: !lambda return x;