From 2b8cf9be986001a0e30780d8a8800783d3e28605 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 14:46:25 +0200 Subject: [PATCH 01/17] Remove compatibility warning for LSC smart plug with BK7231N Removed warning about compatibility with ESPHome for LSC smart plug 2578685. --- src/docs/devices/LSC-Plug-2578685/index.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/index.md b/src/docs/devices/LSC-Plug-2578685/index.md index dac0b9453..f8f04322b 100644 --- a/src/docs/devices/LSC-Plug-2578685/index.md +++ b/src/docs/devices/LSC-Plug-2578685/index.md @@ -6,10 +6,6 @@ standard: eu board: bk72xx --- -## Warning - -The latest LSC smart plug 2578685 devices use the Tuya BK7231N module, which is not compatible with ESPHome! - ## Notice - This smart plug is flashable using the latest tuya-cloudcutter with a compiled ESPHome binary. I recommend following From df29705ef6ee0face2faf32d10332737f0bad8be Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 17:47:38 +0200 Subject: [PATCH 02/17] Add configuration for LSC Plug BK7231T --- .../LSC-Plug-2578685/LSC-Plug-BK7231T.yaml | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml new file mode 100644 index 000000000..adc189bc7 --- /dev/null +++ b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml @@ -0,0 +1,124 @@ +substitutions: + name: lsc-switch-01 + friendly_name: lsc-switch-01 +esphome: + name: ${name} + friendly_name: ${friendly_name} + +libretuya: + board: generic-bk7231t-qfn32-tuya + framework: + version: dev + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: !secret api_encryption_key + +ota: + password: !secret ota_password + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot in case wifi connection fails + ap: + ssid: "Lsc-Switch-01 Fallback Hotspot" + password: "" + +#web_server: +# port: 80 + +sensor: + - platform: wifi_signal + name: "WiFi Signal Sensor" + update_interval: 60s + + - platform: uptime + name: Uptime Sensor + id: uptime_sensor + update_interval: 60s + on_raw_value: + then: + - text_sensor.template.publish: + id: uptime_human + state: !lambda |- + int seconds = round(id(uptime_sensor).raw_state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + seconds = seconds % 60; + return ( + (days ? to_string(days) + "d " : "") + + (hours ? to_string(hours) + "h " : "") + + (minutes ? to_string(minutes) + "m " : "") + + (to_string(seconds) + "s") + ).c_str(); + +text_sensor: + - platform: template + name: Uptime Human Readable + id: uptime_human + icon: mdi:clock-start + - platform: wifi_info + ip_address: + name: IP Address + entity_category: diagnostic + +binary_sensor: + - platform: status + name: Status + entity_category: diagnostic + + - platform: gpio + pin: + number: P7 + mode: + input: true + pullup: true + inverted: true + name: "Power Button" + on_press: + - switch.toggle: relay + +switch: + - platform: gpio + # RED + id: led_1 + pin: + number: P6 + inverted: false + + - platform: gpio + # BLUE + id: led_2 + pin: + number: P26 + inverted: false + + - platform: gpio + name: Switch + pin: P8 + id: relay + + # Turn off red LED to show blue when turned on + on_turn_on: + - switch.turn_on: led_2 + - switch.turn_off: led_1 + + # Turns on the red LED once the plug is turned off + on_turn_off: + - switch.turn_off: led_2 + - switch.turn_on: led_1 + +button: + - platform: restart + id: restart_button + name: Restart + entity_category: diagnostic From 84b50a6aa143e3dd80844ba27c74553b4f045cc4 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 18:14:59 +0200 Subject: [PATCH 03/17] Create LSC-Plug-BK7231N.yaml configuration file Added configuration for LSC Plug BK7231N including WiFi, sensors, and relay control. --- .../LSC-Plug-2578685/LSC-Plug-BK7231N.yaml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml new file mode 100644 index 000000000..3da97d553 --- /dev/null +++ b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml @@ -0,0 +1,53 @@ +esphome: + name: lsc-plug-1 + +bk72xx: + board: generic-bk7231n-qfn32-tuya + +logger: + +web_server: + +captive_portal: + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + ap: + ssid: "lsc_plug_1 Hotspot" + password: !secret wifi_ap_password + +sensor: + - platform: wifi_signal + name: "WiFi Signal Sensor" + update_interval: 60s + +status_led: + pin: P26 + +output: + - platform: gpio + id: relay_1_led + pin: P8 + +binary_sensor: + - platform: gpio + id: button_1 + name: lsc-plug-1_button + pin: + number: P7 + mode: INPUT_PULLUP + inverted: true + internal: true + on_press: + - switch.toggle: relay_1 + +switch: + - platform: gpio + id: relay_1 + name: lsc-plug-1_relay + pin: P6 + on_turn_on: + - output.turn_on: relay_1_led + on_turn_off: + - output.turn_off: relay_1_led From 4af65e3dccd0fecd4786e060dfb2b4489bf849c7 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 18:22:27 +0200 Subject: [PATCH 04/17] Set Board names --- src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml index 3da97d553..afa6ebe53 100644 --- a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml +++ b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml @@ -21,16 +21,19 @@ sensor: - platform: wifi_signal name: "WiFi Signal Sensor" update_interval: 60s - + +# LED2 on board status_led: pin: P26 output: + # LED1 on board - platform: gpio id: relay_1_led pin: P8 binary_sensor: + # SW1 on board - platform: gpio id: button_1 name: lsc-plug-1_button @@ -43,6 +46,7 @@ binary_sensor: - switch.toggle: relay_1 switch: + # RY1 on board - platform: gpio id: relay_1 name: lsc-plug-1_relay From 75ba3395a0431a949e88ce0b12fd9a37f93abe41 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 18:23:25 +0200 Subject: [PATCH 05/17] Modify LSC Plug configuration and WiFi settings Updated the LSC Plug configuration to set a specific name and friendly name. Added status LED configuration and modified WiFi settings. --- .../LSC-Plug-2578685/LSC-Plug-BK7231T.yaml | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml index adc189bc7..06861cf61 100644 --- a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml +++ b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml @@ -1,9 +1,5 @@ -substitutions: - name: lsc-switch-01 - friendly_name: lsc-switch-01 esphome: - name: ${name} - friendly_name: ${friendly_name} + name: lsc-plug-1 libretuya: board: generic-bk7231t-qfn32-tuya @@ -13,14 +9,6 @@ libretuya: # Enable logging logger: -# Enable Home Assistant API -api: - encryption: - key: !secret api_encryption_key - -ota: - password: !secret ota_password - wifi: ssid: !secret wifi_ssid password: !secret wifi_password @@ -28,11 +16,16 @@ wifi: # Enable fallback hotspot in case wifi connection fails ap: ssid: "Lsc-Switch-01 Fallback Hotspot" - password: "" - -#web_server: -# port: 80 - + password: !secret wifi_ap_password + +sensor: + - platform: wifi_signal + name: "WiFi Signal Sensor" + update_interval: 60s + +status_led: + pin: P26 + sensor: - platform: wifi_signal name: "WiFi Signal Sensor" From 99f0e94cf3553677b400b1c1bc1f97419bbd512a Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 18:28:52 +0200 Subject: [PATCH 06/17] Update configuration for LSC-Plug BK7231T and BK7231N MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add "yaml file" intégration format Clean and check BK7231N YAML files to be more simple --- src/docs/devices/LSC-Plug-2578685/index.md | 192 +-------------------- 1 file changed, 3 insertions(+), 189 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/index.md b/src/docs/devices/LSC-Plug-2578685/index.md index f8f04322b..44785c875 100644 --- a/src/docs/devices/LSC-Plug-2578685/index.md +++ b/src/docs/devices/LSC-Plug-2578685/index.md @@ -43,196 +43,10 @@ Pinout for Version with BK7231N (Relay and LED Swapped) ## Basic configuration Version for BK7231T: - -```yml -substitutions: - name: lsc-switch-01 - friendly_name: lsc-switch-01 -esphome: - name: ${name} - friendly_name: ${friendly_name} - -libretuya: - board: generic-bk7231t-qfn32-tuya - framework: - version: dev - -# Enable logging -logger: - -# Enable Home Assistant API -api: - encryption: - key: !secret api_encryption_key - -ota: - password: !secret ota_password - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - - # Enable fallback hotspot in case wifi connection fails - ap: - ssid: "Lsc-Switch-01 Fallback Hotspot" - password: "" - -#web_server: -# port: 80 - -sensor: - - platform: wifi_signal - name: "WiFi Signal Sensor" - update_interval: 60s - - - platform: uptime - name: Uptime Sensor - id: uptime_sensor - update_interval: 60s - on_raw_value: - then: - - text_sensor.template.publish: - id: uptime_human - state: !lambda |- - int seconds = round(id(uptime_sensor).raw_state); - int days = seconds / (24 * 3600); - seconds = seconds % (24 * 3600); - int hours = seconds / 3600; - seconds = seconds % 3600; - int minutes = seconds / 60; - seconds = seconds % 60; - return ( - (days ? to_string(days) + "d " : "") + - (hours ? to_string(hours) + "h " : "") + - (minutes ? to_string(minutes) + "m " : "") + - (to_string(seconds) + "s") - ).c_str(); - -text_sensor: - - platform: template - name: Uptime Human Readable - id: uptime_human - icon: mdi:clock-start - - platform: wifi_info - ip_address: - name: IP Address - entity_category: diagnostic - -binary_sensor: - - platform: status - name: Status - entity_category: diagnostic - - - platform: gpio - pin: - number: P7 - mode: - input: true - pullup: true - inverted: true - name: "Power Button" - on_press: - - switch.toggle: relay - -switch: - - platform: gpio - # RED - id: led_1 - pin: - number: P6 - inverted: false - - - platform: gpio - # BLUE - id: led_2 - pin: - number: P26 - inverted: false - - - platform: gpio - name: Switch - pin: P8 - id: relay - - # Turn off red LED to show blue when turned on - on_turn_on: - - switch.turn_on: led_2 - - switch.turn_off: led_1 - - # Turns on the red LED once the plug is turned off - on_turn_off: - - switch.turn_off: led_2 - - switch.turn_on: led_1 - -button: - - platform: restart - id: restart_button - name: Restart - entity_category: diagnostic +```yaml file=LSC-Plug-BK7231T.yaml ``` -Version for BK7231N: - -```yml -esphome: - name: lsc-plug-1 - -bk72xx: - board: generic-bk7231n-qfn32-tuya - -logger: - -web_server: - -captive_portal: -api: - encryption: - key: !secret encryption_key - -ota: - password: !secret ota_password_new - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - ap: - ssid: "lsc_plug_1 Hotspot" - password: "12345678" - -text_sensor: - - platform: libretiny - version: - name: LibreTiny Version - -status_led: - pin: P26 - -binary_sensor: - - platform: status - name: lsc-plug-1_status - - platform: gpio - pin: - number: P7 - mode: INPUT_PULLUP - inverted: true - name: lsc-plug-1_button - internal: true - on_press: - - switch.toggle: relay - -output: - - platform: gpio - id: relay_led - pin: P8 - -switch: - - platform: gpio - id: relay - name: lsc-plug-1_relay - pin: P6 - on_turn_on: - - output.turn_on: relay_led - on_turn_off: - - output.turn_off: relay_led +Version for BK7231N: +```yaml file=LSC-Plug-BK7231N.yaml ``` From cd98a46f20d604e88028a7b852d22f1725808e89 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 18:32:29 +0200 Subject: [PATCH 07/17] Remove secrets Updated the fallback hotspot SSID for LSC Plug configuration. --- src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml index 06861cf61..bfec14522 100644 --- a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml +++ b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml @@ -10,13 +10,8 @@ libretuya: logger: wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - - # Enable fallback hotspot in case wifi connection fails ap: - ssid: "Lsc-Switch-01 Fallback Hotspot" - password: !secret wifi_ap_password + ssid: "Lsc-plug Hotspot" sensor: - platform: wifi_signal From 591b33be6c597cb319408e8bd63aa8b4b5003ec2 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 18:34:01 +0200 Subject: [PATCH 08/17] Pas de secrets entre nous Updated Wifi LSC Plug configuration. --- src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml index afa6ebe53..11e637554 100644 --- a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml +++ b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml @@ -11,11 +11,8 @@ web_server: captive_portal: wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password ap: - ssid: "lsc_plug_1 Hotspot" - password: !secret wifi_ap_password + ssid: "LSC-Plug Hotspot" sensor: - platform: wifi_signal From 37c25b1a89002426ef8e5b12bfece2dc1563f46f Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:38:08 +0200 Subject: [PATCH 09/17] Create clean configuration for LSC Plug 2578685 --- src/docs/devices/LSC-Plug-2578685/config.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/docs/devices/LSC-Plug-2578685/config.yaml diff --git a/src/docs/devices/LSC-Plug-2578685/config.yaml b/src/docs/devices/LSC-Plug-2578685/config.yaml new file mode 100644 index 000000000..5a31c28a4 --- /dev/null +++ b/src/docs/devices/LSC-Plug-2578685/config.yaml @@ -0,0 +1,55 @@ +substitutions: + board_model: "bk7231n" +# OR +# board_model: "bk7231t" + +packages: + hardware: !include device-${board_model}.yaml + +esphome: + name: lsc-plug-1 + +logger: + +web_server: + +captive_portal: + +wifi: + ap: + ssid: "lsc_plug_1 Hotspot" + +sensor: + - platform: wifi_signal + name: "WiFi Signal Sensor" + update_interval: 60s + +status_led: + pin: ${pin.led1} + +binary_sensor: + - platform: gpio + id: button_1 + name: lsc-plug-1_button + pin: + number: ${pin.sw1} + mode: INPUT_PULLUP + inverted: true + internal: true + on_press: + - switch.toggle: relay_1 + +output: + - platform: gpio + id: relay_1_led + pin: ${pin.led2} + +switch: + - platform: gpio + id: relay_1 + name: lsc-plug-1_relay + pin: ${pin.ry1} + on_turn_on: + - output.turn_on: relay_1_led + on_turn_off: + - output.turn_off: relay_1_led From 8560eee4b1aecad437563984d764b5992a2ebe91 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:39:26 +0200 Subject: [PATCH 10/17] Delete src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml --- .../LSC-Plug-2578685/LSC-Plug-BK7231N.yaml | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml deleted file mode 100644 index 11e637554..000000000 --- a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231N.yaml +++ /dev/null @@ -1,54 +0,0 @@ -esphome: - name: lsc-plug-1 - -bk72xx: - board: generic-bk7231n-qfn32-tuya - -logger: - -web_server: - -captive_portal: - -wifi: - ap: - ssid: "LSC-Plug Hotspot" - -sensor: - - platform: wifi_signal - name: "WiFi Signal Sensor" - update_interval: 60s - -# LED2 on board -status_led: - pin: P26 - -output: - # LED1 on board - - platform: gpio - id: relay_1_led - pin: P8 - -binary_sensor: - # SW1 on board - - platform: gpio - id: button_1 - name: lsc-plug-1_button - pin: - number: P7 - mode: INPUT_PULLUP - inverted: true - internal: true - on_press: - - switch.toggle: relay_1 - -switch: - # RY1 on board - - platform: gpio - id: relay_1 - name: lsc-plug-1_relay - pin: P6 - on_turn_on: - - output.turn_on: relay_1_led - on_turn_off: - - output.turn_off: relay_1_led From 5ae9d15246ad441f2f5a148e97afff4eb906c722 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:39:34 +0200 Subject: [PATCH 11/17] Delete src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml --- .../LSC-Plug-2578685/LSC-Plug-BK7231T.yaml | 112 ------------------ 1 file changed, 112 deletions(-) delete mode 100644 src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml diff --git a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml b/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml deleted file mode 100644 index bfec14522..000000000 --- a/src/docs/devices/LSC-Plug-2578685/LSC-Plug-BK7231T.yaml +++ /dev/null @@ -1,112 +0,0 @@ -esphome: - name: lsc-plug-1 - -libretuya: - board: generic-bk7231t-qfn32-tuya - framework: - version: dev - -# Enable logging -logger: - -wifi: - ap: - ssid: "Lsc-plug Hotspot" - -sensor: - - platform: wifi_signal - name: "WiFi Signal Sensor" - update_interval: 60s - -status_led: - pin: P26 - -sensor: - - platform: wifi_signal - name: "WiFi Signal Sensor" - update_interval: 60s - - - platform: uptime - name: Uptime Sensor - id: uptime_sensor - update_interval: 60s - on_raw_value: - then: - - text_sensor.template.publish: - id: uptime_human - state: !lambda |- - int seconds = round(id(uptime_sensor).raw_state); - int days = seconds / (24 * 3600); - seconds = seconds % (24 * 3600); - int hours = seconds / 3600; - seconds = seconds % 3600; - int minutes = seconds / 60; - seconds = seconds % 60; - return ( - (days ? to_string(days) + "d " : "") + - (hours ? to_string(hours) + "h " : "") + - (minutes ? to_string(minutes) + "m " : "") + - (to_string(seconds) + "s") - ).c_str(); - -text_sensor: - - platform: template - name: Uptime Human Readable - id: uptime_human - icon: mdi:clock-start - - platform: wifi_info - ip_address: - name: IP Address - entity_category: diagnostic - -binary_sensor: - - platform: status - name: Status - entity_category: diagnostic - - - platform: gpio - pin: - number: P7 - mode: - input: true - pullup: true - inverted: true - name: "Power Button" - on_press: - - switch.toggle: relay - -switch: - - platform: gpio - # RED - id: led_1 - pin: - number: P6 - inverted: false - - - platform: gpio - # BLUE - id: led_2 - pin: - number: P26 - inverted: false - - - platform: gpio - name: Switch - pin: P8 - id: relay - - # Turn off red LED to show blue when turned on - on_turn_on: - - switch.turn_on: led_2 - - switch.turn_off: led_1 - - # Turns on the red LED once the plug is turned off - on_turn_off: - - switch.turn_off: led_2 - - switch.turn_on: led_1 - -button: - - platform: restart - id: restart_button - name: Restart - entity_category: diagnostic From 790fbe0bbe00d986bdf07901105b8c277c0cb0e2 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:40:11 +0200 Subject: [PATCH 12/17] Add device configuration for LSC Plug BK7231T --- src/docs/devices/LSC-Plug-2578685/device-bk7231t.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/docs/devices/LSC-Plug-2578685/device-bk7231t.yaml diff --git a/src/docs/devices/LSC-Plug-2578685/device-bk7231t.yaml b/src/docs/devices/LSC-Plug-2578685/device-bk7231t.yaml new file mode 100644 index 000000000..47298afa3 --- /dev/null +++ b/src/docs/devices/LSC-Plug-2578685/device-bk7231t.yaml @@ -0,0 +1,9 @@ +substitutions: + pin: + led1: P26 + ry1: P8 + sw1: P7 + led2: P6 + +bk72xx: + board: generic-bk7231t-qfn32-tuya From 58e9d949900f3e3c581bc86d831fd1b127dd17fc Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:40:54 +0200 Subject: [PATCH 13/17] Add device configuration for LSC Plug BK7231N --- src/docs/devices/LSC-Plug-2578685/device-bk7231n.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/docs/devices/LSC-Plug-2578685/device-bk7231n.yaml diff --git a/src/docs/devices/LSC-Plug-2578685/device-bk7231n.yaml b/src/docs/devices/LSC-Plug-2578685/device-bk7231n.yaml new file mode 100644 index 000000000..fa98414f2 --- /dev/null +++ b/src/docs/devices/LSC-Plug-2578685/device-bk7231n.yaml @@ -0,0 +1,11 @@ +substitutions: + pin: + led1: P26 + ry1: P6 + sw1: P7 + led2: P8 + +bk72xx: + board: generic-bk7231n-qfn32-tuya + + From 2b3c4d409d880cf06e53096106a9067739443363 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:44:50 +0200 Subject: [PATCH 14/17] Revise basic configuration for LSC-Plug devices Updated configuration instructions for BK7231T and BK7231N. --- src/docs/devices/LSC-Plug-2578685/index.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/index.md b/src/docs/devices/LSC-Plug-2578685/index.md index 44785c875..cd371e2bb 100644 --- a/src/docs/devices/LSC-Plug-2578685/index.md +++ b/src/docs/devices/LSC-Plug-2578685/index.md @@ -42,11 +42,7 @@ Pinout for Version with BK7231N (Relay and LED Swapped) ## Basic configuration -Version for BK7231T: -```yaml file=LSC-Plug-BK7231T.yaml +Version for BK7231T and BK7231N, just change board_model substitutions: +```yaml file=config.yaml ``` - -Version for BK7231N: -```yaml file=LSC-Plug-BK7231N.yaml -``` From 020f40faf51764ec13e7f1e35757da75770a2f0e Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:48:46 +0200 Subject: [PATCH 15/17] Clean up config.yaml by removing unnecessary sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed unused logger, web_server, and captive_portal sections from the config. 🙄 --- src/docs/devices/LSC-Plug-2578685/config.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/config.yaml b/src/docs/devices/LSC-Plug-2578685/config.yaml index 5a31c28a4..28a411e68 100644 --- a/src/docs/devices/LSC-Plug-2578685/config.yaml +++ b/src/docs/devices/LSC-Plug-2578685/config.yaml @@ -9,15 +9,8 @@ packages: esphome: name: lsc-plug-1 -logger: - -web_server: - -captive_portal: - wifi: ap: - ssid: "lsc_plug_1 Hotspot" sensor: - platform: wifi_signal From 3d002c7bc5da6dd6333d47339f01ac59faa7901c Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 19:52:13 +0200 Subject: [PATCH 16/17] Fix Blank lines in index.md Removed unnecessary line breaks in YAML code block. --- src/docs/devices/LSC-Plug-2578685/index.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/docs/devices/LSC-Plug-2578685/index.md b/src/docs/devices/LSC-Plug-2578685/index.md index cd371e2bb..6a1000df0 100644 --- a/src/docs/devices/LSC-Plug-2578685/index.md +++ b/src/docs/devices/LSC-Plug-2578685/index.md @@ -43,6 +43,4 @@ Pinout for Version with BK7231N (Relay and LED Swapped) ## Basic configuration Version for BK7231T and BK7231N, just change board_model substitutions: -```yaml file=config.yaml -``` - +```yaml file=config.yaml``` From b46f900ff4f2aa1eecf4b78407001ca1a7afc4d4 Mon Sep 17 00:00:00 2001 From: "www 3.0" Date: Wed, 29 Jul 2026 20:17:03 +0200 Subject: [PATCH 17/17] Fix YAML code block formatting in documentation --- src/docs/devices/LSC-Plug-2578685/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/docs/devices/LSC-Plug-2578685/index.md b/src/docs/devices/LSC-Plug-2578685/index.md index 6a1000df0..a5291c69c 100644 --- a/src/docs/devices/LSC-Plug-2578685/index.md +++ b/src/docs/devices/LSC-Plug-2578685/index.md @@ -43,4 +43,5 @@ Pinout for Version with BK7231N (Relay and LED Swapped) ## Basic configuration Version for BK7231T and BK7231N, just change board_model substitutions: -```yaml file=config.yaml``` +```yaml file=config.yaml +```