Skip to content

Commit

Permalink
Simplify LSC Smart Connect XXL-LED-Stripe and Ledvance E27 RGBW Light…
Browse files Browse the repository at this point in the history
… 806lm (esphome#817)

Co-authored-by: Ryan Hoffman <tekmaven@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 3, 2024
1 parent 5e6e168 commit 69e5951
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 128 deletions.
66 changes: 4 additions & 62 deletions src/docs/devices/LEDVANCE-E27-RGBW/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,10 @@ Can be flashed with esphome kickstart via tuya-cloudcutter!!
## Basic Configuration

```yaml
substitutions:
device_name: ledvance-e27-rgbw
device_name_letters: ledvancee27rgbw
device_description: Ledvance E27 RGBW Bulb
friendly_name: Ledvance E27 RGBW Bulb

esphome:
name: ${device_name}
comment: ${device_description}
friendly_name: ${friendly_name}
on_boot:
priority: 600
then:
- light.turn_on:
id: light_rgbw
brightness: 100%
color_mode: WHITE
name: ledvance-e27-rgbw
comment: Ledvance E27 RGBW Bulb
friendly_name: Ledvance E27 RGBW Bulb

bk72xx:
board: generic-bk7231t-qfn32-tuya
Expand All @@ -59,57 +46,12 @@ ota:

# WiFi connection
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: ${device_name}_fallback
password: !secret ap_password
use_address: ${device_name}.lan

captive_portal:

# Enable Web server
web_server:
port: 80

button:
- platform: restart
name: Restart

- platform: template
name: "White"
on_press:
light.turn_on:
id: light_rgbw
brightness: 100%
color_mode: WHITE

debug:
update_interval: 30s

# Sync time with Home Assistant
time:
- platform: homeassistant
id: ha_time

# Text sensors with general information
text_sensor:
- platform: version
name: ${friendly_name} Version
- platform: wifi_info
ip_address:
name: ${friendly_name} IP Address
- platform: debug
reset_reason:
name: Reset Reason


sensor:
- platform: uptime
name: uptime
# WiFi Signal sensor
- platform: wifi_signal
name: ${friendly_name} Wifi Signal

output:
- platform: libretiny_pwm
Expand All @@ -128,7 +70,7 @@ output:
light:
- platform: rgbw
id: light_rgbw
name: Light
name: None
color_interlock: true
red: output_red
green: output_green
Expand Down
74 changes: 8 additions & 66 deletions src/docs/devices/LSC-Smart-Connect-XXL-LED-Stripe-10Meter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,10 @@ which comes as a colour changing LED strip with controller and transformer.

```yaml
# LSC Smart Connect XXL-LED-Stripe 3202086

substitutions:
device_name: terasse-led-stripe
device_name_letters: terasseLedStripe
device_description: LSC Smart Connect XXL-LED-Stripe 3202086
friendly_name: LSC Smart Connect XXL-LED-Stripe 3202086

esphome:
name: ${device_name}
comment: ${device_description}
friendly_name: ${friendly_name}
name: terasse-led-stripe
comment: LSC Smart Connect XXL-LED-Stripe 3202086
friendly_name: LSC Smart Connect XXL-LED-Stripe

bk72xx:
board: generic-bk7231n-qfn32-tuya
Expand All @@ -53,36 +46,13 @@ ota:

# Enable Web server
web_server:
port: 80

# Sync time with Home Assistant
time:
- platform: homeassistant
id: homeassistant_time

# WiFi connection
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: ${device_name}_fallback
password: !secret ap_password
ap_timeout: 1min
use_address: ${device_name}.lan

captive_portal:

text_sensor:
- platform: wifi_info
ip_address:
name: ESP IP Address
ssid:
name: ESP Connected SSID
bssid:
name: ESP Connected BSSID
mac_address:
name: ESP Mac Wifi Address

light:
- platform: cwww
id: white_light
Expand All @@ -92,14 +62,7 @@ light:
cold_white_color_temperature: 6500 K
warm_white_color_temperature: 2700 K
on_turn_on:
- switch.turn_on: LED_Power
- light.turn_off: color_light
on_turn_off:
- if:
condition:
light.is_off: color_light
then:
- switch.turn_off: LED_Power

- platform: beken_spi_led_strip
id: color_light
Expand All @@ -108,6 +71,7 @@ light:
chipset: WS2812
num_leds: 40
rgb_order: RBG
power_supply: led_power
effects:
- random:
- pulse:
Expand All @@ -121,43 +85,21 @@ light:
- addressable_fireworks:
- addressable_flicker:
on_turn_on:
- switch.turn_on: LED_Power
- light.turn_off: white_light
on_turn_off:
- if:
condition:
light.is_off: white_light
then:
- switch.turn_off: LED_Power

output:
- platform: libretiny_pwm
id: output_cw
pin: P9
power_supply: led_power
- platform: libretiny_pwm
id: output_ww
pin: P24
power_supply: led_power

switch:
# Switch to toggle the relay (Power output)
- platform: gpio
name: "LED Power 24V"
id: LED_Power
power_supply:
id: led_power
pin: P6
internal: True

sensor:
# Uptime sensor
- platform: uptime
name: ${friendly_name} Uptime
unit_of_measurement: minutes
filters:
- lambda: return x / 60.0;
- platform: wifi_signal
name: ${friendly_name} Signal
update_interval: 60s
- platform: internal_temperature
name: "Internal Temperature"

remote_receiver:
pin:
Expand Down

0 comments on commit 69e5951

Please sign in to comment.