more esphome devices and fixes

This commit is contained in:
root
2026-04-03 21:37:58 +13:00
parent f7bfa78835
commit 4806807e75
+26 -20
View File
@@ -1,30 +1,39 @@
#:########################################################################################:#
# TITLE: MAIN HALLWAY LIGHTSWITCH 1 (BK7231N)
# zorruno.com layout
# zorruno.com layout v1.1 2026
#:########################################################################################:#
# REPO:
#
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-mainhallwaylights1.yaml
#:########################################################################################:#
# VERSIONS:
# V1.1 2026-04-03 Updated yaml to zorruno layout V1.1; corrected KS-811 single naming and operation notes; updated BK7231N single-switch pin mapping
# V1.0 2026-04-03 Initial
#:########################################################################################:#
# HARDWARE:
# - Zemismart KS-811 Single push button
# - BK7231N based switch
# - BK72XX board: generic-bk7231n-qfn32-tuya
# - pinout/schematic:
# https://community.home-assistant.io/t/zemismart-ks-811-working-with-esphome/
# - BK7231N single-switch pin mapping checked against KS-811 BK references
#:########################################################################################:#
# OPERATION NOTES:
# - Main bathroom switch with 1 output:
# - Main hallway switch with 1 output:
# 1) Main Hallway Lights
#
# - A single press of the physical button toggles Relay 1 ON/OFF
# - Status LED uses P22
#:########################################################################################:#
# MQTT COMMANDS:
# -
# - None
#:########################################################################################:#
# OFFLINE NOTES:
#
# - a) Home Assistant offline (network and MQTT online):
# - Device remains on WiFi and MQTT
# - Physical button still toggles relay locally
# - b) MQTT offline (or Home Assistant and MQTT offline):
# - Physical button still toggles relay locally
# - Remote control/state sync is unavailable until MQTT returns
# - c) Entire WiFi/network offline:
# - Physical button still toggles relay locally
# - Accurate time is not needed; SNTP is not used
#:########################################################################################:#
#:########################################################################################:#
@@ -35,12 +44,12 @@ substitutions:
# Device Naming
device_name: "esp-mainhallwaylights1"
friendly_name: "Main Hallway Lightswitch (1)"
description_comment: "BK7231N - Main Hallway Lightswitch using a Zemismart KS-811 Single Push Button. Main Hallway Lights (1)"
description_comment: "BK7231N - Main Hallway Lightswitch using a Zemismart KS-811 Single Push Button. Main Hallway Lights (1) (Layout V1.1)"
device_area: "Main Hallway" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
# Project Naming
project_name: "Zemismart Technologies.KS-811 Triple BK7231N" # Project Details
project_version: "v1.0" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
project_name: "Zemismart Technologies.KS-811 Single BK7231N" # Project Details
project_version: "v1.1" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
# Passwords
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
@@ -126,10 +135,6 @@ esphome:
project:
name: "${project_name}"
version: "${project_version}"
# on_boot:
# priority: 200
# then:
# - switch.turn_on: Relay_3
#:########################################################################################:#
# BUILD FOR BK CHIPSET:
@@ -163,18 +168,19 @@ status_led:
#:########################################################################################:#
binary_sensor:
- platform: gpio
id: button_1
internal: true
pin:
number: P17
number: P24 # GPIO24
mode:
input: true
pullup: true
inverted: true
name: "Button 1: ${switch_1_name}"
filters:
- delayed_on: 20ms
on_press:
- delay: 50ms
- switch.toggle: Relay_1
#:########################################################################################:#
# SWITCH COMPONENT:
# https://esphome.io/components/switch/
@@ -182,6 +188,6 @@ binary_sensor:
switch:
- platform: gpio
name: "Relay 1: ${switch_1_name}"
pin: P14 #GPIO14
pin: P16 # GPIO16
id: Relay_1
restore_mode: ${relay_restore_mode}