diff --git a/doc/example-full.yaml b/doc/example-full.yaml index 02b0890..383a72f 100644 --- a/doc/example-full.yaml +++ b/doc/example-full.yaml @@ -32,6 +32,8 @@ esphome: platform_packages: |-4 framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.6 +# NOTE: HIGHLY OPTIONAL BLOCK +# # 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 @@ -71,3 +73,12 @@ light: transition_length: 3s update_interval: 3s +# An implementation for the power button: touch to toggle the light. +binary_sensor: + - platform: yeelight_bs2 + id: ${name}_power_button + part: POWER_BUTTON + on_press: + then: + - light.toggle: ${name} + diff --git a/doc/example.yaml b/doc/example.yaml index 04e09b3..12f37f6 100644 --- a/doc/example.yaml +++ b/doc/example.yaml @@ -48,3 +48,11 @@ light: transition_length: 3s update_interval: 3s +binary_sensor: + - platform: yeelight_bs2 + id: ${name}_power_button + part: POWER_BUTTON + on_press: + then: + - light.toggle: ${name} +