From dd9143dfa9bd37039f5f66c6580d24443ca1f7b7 Mon Sep 17 00:00:00 2001 From: Maurice Makaay Date: Sun, 11 Apr 2021 04:39:22 +0200 Subject: [PATCH] Added a configuration example that includes all yeelight_bs2 component configuration options. Normally, you can fully omit this component from the device yaml configuration. It will implictly load working defaults. --- doc/example-full.yaml | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 doc/example-full.yaml diff --git a/doc/example-full.yaml b/doc/example-full.yaml new file mode 100644 index 0000000..a8d4491 --- /dev/null +++ b/doc/example-full.yaml @@ -0,0 +1,71 @@ +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 + +# This yeelight_bs2 comopnent acts as the hub for the device. Other +# components talk to the hardware via this component. Normally, you +# wouldn't need to change anything in the default implementation. You +# can even fully omit this element from the configuration. +yeelight_bs2: + - red_id: TheRedOne + - red: GPIO13 + - green_id: TheGreenOne + - green: GPIO14 + - blue_id: TheBlueOne + - blue: GPIO5 + - white_id: TheWhiteOne + - white: GPIO12 + - master1_id: TheFirstMaster + - master1: GPIO33 + - master2_id: TheSecondMaster + - master2: GPIO4 + - sda: GPIO21 + - scl: GPIO19 + - trigger_pin: GPIO16 + +# 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 +